Skip to content

Commit

Permalink
rn,media: avoid creating presenter tracks
Browse files Browse the repository at this point in the history
When ensureTrack is set to true a track will be created with the given media
type. 'presenter' is not supported on RN.
  • Loading branch information
saghul committed Jan 24, 2020
1 parent 5d86d20 commit 5a027f1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions react/features/base/media/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ function _setAudioOnly({ dispatch }, next, action) {
sendAnalytics(createTrackMutedEvent('video', 'audio-only mode', audioOnly));

// Make sure we mute both the desktop and video tracks.
dispatch(setVideoMuted(
audioOnly, MEDIA_TYPE.VIDEO, VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY, ensureVideoTrack));
dispatch(setVideoMuted(
audioOnly, MEDIA_TYPE.PRESENTER, VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY, ensureVideoTrack));
dispatch(setVideoMuted(audioOnly, MEDIA_TYPE.VIDEO, VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY, ensureVideoTrack));

if (navigator.product !== 'ReactNative') {
dispatch(setVideoMuted(audioOnly, MEDIA_TYPE.PRESENTER, VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY, ensureVideoTrack));
}

return next(action);
}
Expand Down

0 comments on commit 5a027f1

Please sign in to comment.