From 51626506ff17d3e1430070ef7c8956646508967c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 1 Oct 2021 14:04:34 +0200 Subject: [PATCH] fix(rn,conference) fix unmute when "everyone starts muted" is set 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: https://github.com/jitsi/jitsi-meet/issues/10053 --- react/features/base/conference/actions.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.js index 567359fc7..df31a7ce5 100644 --- a/react/features/base/conference/actions.js +++ b/react/features/base/conference/actions.js @@ -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)); } }