fix: Fixes start A/V muted received by focus in case of slow gUM.

In case of slow resolving gUM, we can join the call (quickly joining from pre-join screen) and the gUM will be resolved after we receive the start A/V muted from jicofo and will produce a source-add, joining unmuted ignoring jicofo.
This commit is contained in:
Дамян Минков 2022-01-07 12:53:23 -06:00 committed by Jaya Allamsetty
parent c5821d7a5f
commit d91e7c3d31
1 changed files with 15 additions and 1 deletions

View File

@ -841,7 +841,21 @@ export default {
this._displayErrorsForCreateInitialLocalTracks(errors);
return this._setLocalAudioVideoStreams(handleStartAudioMuted(initialOptions, tracks));
let localTracks = handleStartAudioMuted(initialOptions, tracks);
// in case where gum is slow and resolves after the startAudio/VideoMuted coming from jicofo, we can be
// join unmuted even though jicofo had instruct us to mute, so let's respect that before passing the tracks
if (!browser.isWebKitBased()) {
if (room?.isStartAudioMuted()) {
localTracks = localTracks.filter(track => track.getType() !== MEDIA_TYPE.AUDIO);
}
}
if (room?.isStartVideoMuted()) {
localTracks = localTracks.filter(track => track.getType() !== MEDIA_TYPE.VIDEO);
}
return this._setLocalAudioVideoStreams(localTracks);
}
const [ tracks, con ] = await this.createInitialLocalTracksAndConnect(roomName, initialOptions);