From 25271d7eec974dfcdd01e5630ae19107a26a3c98 Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty Date: Mon, 28 Sep 2020 20:34:37 -0400 Subject: [PATCH] fix(presenter): Do not change the video mute state on presenter mute. This fixes the issue where the local preview appears muted when presenter camera is turned on and then off while screenshare is in progress. --- react/features/base/tracks/middleware.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/react/features/base/tracks/middleware.js b/react/features/base/tracks/middleware.js index cf8f2380b..3492ce316 100644 --- a/react/features/base/tracks/middleware.js +++ b/react/features/base/tracks/middleware.js @@ -153,12 +153,10 @@ MiddlewareRegistry.register(store => next => action => { const isVideoTrack = jitsiTrack.type !== MEDIA_TYPE.AUDIO; if (isVideoTrack) { + // Do not change the video mute state for local presenter tracks. if (jitsiTrack.type === MEDIA_TYPE.PRESENTER) { APP.conference.mutePresenter(muted); - } - - // Make sure we change the video mute state only for camera tracks. - if (jitsiTrack.isLocal() && jitsiTrack.videoType !== 'desktop') { + } else if (jitsiTrack.isLocal()) { APP.conference.setVideoMuteStatus(muted); } else { APP.UI.setVideoMuted(participantID, muted);