media: fix creating video track when toggling the welcome page switch

This commit is contained in:
Saúl Ibarra Corretgé 2019-09-13 17:22:13 +02:00 committed by Saúl Ibarra Corretgé
parent 3cc181a2e5
commit 385e1c1047
1 changed files with 2 additions and 2 deletions

View File

@ -90,11 +90,11 @@ function _appStateChanged({ dispatch }, next, action) {
* @returns {Object} The value returned by {@code next(action)}.
*/
function _setAudioOnly({ dispatch }, next, action) {
const { audioOnly } = action;
const { audioOnly, ensureVideoTrack } = action;
sendAnalytics(createTrackMutedEvent('video', 'audio-only mode', audioOnly));
dispatch(setVideoMuted(audioOnly, VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY));
dispatch(setVideoMuted(audioOnly, VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY, ensureVideoTrack));
return next(action);
}