From 84c1c3dfd3659097dd6ea68f1edfafbe7ad74409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 15 Jun 2018 11:39:22 +0200 Subject: [PATCH] [iOS] Fix starting a call muted when permission was not granted Read the muted state from the track itself instead of from base/media. This avoid expressing the incorrect desire when the call starts muted because permission was never granted. --- react/features/mobile/callkit/middleware.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/react/features/mobile/callkit/middleware.js b/react/features/mobile/callkit/middleware.js index 18cf6646b..dcadcbad3 100644 --- a/react/features/mobile/callkit/middleware.js +++ b/react/features/mobile/callkit/middleware.js @@ -290,7 +290,8 @@ function _onPerformSetMutedCallAction({ callUUID, muted: newValue }) { // Break the loop. Audio can be muted from both CallKit and Jitsi Meet. // We must keep them in sync, but at some point the loop needs to be // broken. We are doing it here, on the CallKit handler. - const { muted: oldValue } = getState()['features/base/media'].audio; + const tracks = getState()['features/base/tracks']; + const oldValue = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO); if (oldValue !== newValue) { const value = Boolean(newValue);