From 0308ba71b13d2d04f7c4451cf96a823cb616ff74 Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty <54324652+jallamsetty1@users.noreply.github.com> Date: Tue, 21 Jun 2022 07:21:38 -0400 Subject: [PATCH] fix(audio-only) Do not unmute camera when SS is in progress. If the audio-only mode is automatically disabled when user starts a screenshare while in audio-only mode, do not unmute the camera track. --- conference.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/conference.js b/conference.js index 2fbf726e3..daa1d27ec 100644 --- a/conference.js +++ b/conference.js @@ -1759,12 +1759,12 @@ export default { return Promise.reject('Cannot toggle screen sharing: not supported.'); } - if (this.isAudioOnly()) { - APP.store.dispatch(setAudioOnly(false)); - } if (toggle) { try { await this._switchToScreenSharing(options); + if (this.isAudioOnly()) { + APP.store.dispatch(setAudioOnly(false)); + } return; } catch (err) { @@ -2653,13 +2653,9 @@ export default { // muteVideo logic in such case. const tracks = APP.store.getState()['features/base/tracks']; const isTrackInRedux - = Boolean( - tracks.find( - track => track.jitsiTrack - && track.jitsiTrack.getType() === 'video')); + = Boolean(tracks.find(track => track.jitsiTrack && track.jitsiTrack.getType() === MEDIA_TYPE.VIDEO)); - - if (isTrackInRedux) { + if (isTrackInRedux && !this.isSharingScreen) { this.muteVideo(audioOnly); }