Skip to content

Commit

Permalink
fix(rn,conference) fix unmute when "everyone starts muted" is set
Browse files Browse the repository at this point in the history
Since iOS 15 we really need the audio stream to exist, so make sure we don't
destroy it even when "everyone starts muted" is set, we'll just mute it.

Fixes: jitsi#10053
  • Loading branch information
saghul committed Oct 1, 2021
1 parent 6124e72 commit 0cbadb9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions react/features/base/conference/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ function _addConferenceListeners(conference, dispatch, state) {

// Remove the tracks from peerconnection as well.
for (const track of localTracks) {
if ((audioMuted && track.jitsiTrack.getType() === MEDIA_TYPE.AUDIO)
|| (videoMuted && track.jitsiTrack.getType() === MEDIA_TYPE.VIDEO)) {
const trackType = track.jitsiTrack.getType();

// Do not remove the audio track on RN. Starting with iOS 15 it will fail to unmute otherwise.
if ((audioMuted && trackType === MEDIA_TYPE.AUDIO && navigator.product !== 'ReactNative')
|| (videoMuted && trackType === MEDIA_TYPE.VIDEO)) {
dispatch(replaceLocalTrack(track.jitsiTrack, null, conference));
}
}
Expand Down

0 comments on commit 0cbadb9

Please sign in to comment.