fix(conference) Do not add audio track from screenshare to redux.

In audio-only screenshare mode when there is no local audio track from mic present, do not add the audio track from screenshare to redux. Adding the track to redux will sync the track mute state to that of /base/media and show that the mic is unmuted even when that is not the case. Fixes https://github.com/jitsi/jitsi-meet/issues/10706.
This commit is contained in:
Jaya Allamsetty 2022-04-04 11:19:33 -04:00
parent 0713240c3d
commit b7c2ccd814
1 changed files with 5 additions and 4 deletions

View File

@ -1633,7 +1633,8 @@ export default {
// In case there was no local audio when screen sharing was started the fact that we set the audio stream to
// null will take care of the desktop audio stream cleanup.
} else if (this._desktopAudioStream) {
await this.useAudioStream(null);
await room.replaceTrack(this._desktopAudioStream, null);
this._desktopAudioStream.dispose();
this._desktopAudioStream = undefined;
}
@ -1976,9 +1977,9 @@ export default {
} else {
// If no local stream is present ( i.e. no input audio devices) we use the screen share audio
// stream as we would use a regular stream.
logger.debug(`_switchToScreenSharing is using ${this._desktopAudioStream} for useAudioStream`);
await this.useAudioStream(this._desktopAudioStream);
logger.debug(`_switchToScreenSharing is using ${this._desktopAudioStream} for replacing it as`
+ ' the only audio track on the conference');
await room.replaceTrack(null, this._desktopAudioStream);
}
APP.store.dispatch(setScreenAudioShareState(true));
}