Skip to content

Commit

Permalink
fix(audio-only) Do not unmute camera when SS is in progress.
Browse files Browse the repository at this point in the history
If the audio-only mode is automatically disabled when user starts a screenshare while in audio-only mode, do not unmute the camera track.
  • Loading branch information
jallamsetty1 committed Jun 21, 2022
1 parent f7d1a5e commit 0308ba7
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 0308ba7

Please sign in to comment.