[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.
This commit is contained in:
Saúl Ibarra Corretgé 2018-06-15 11:39:22 +02:00
parent fccd0d6b29
commit 84c1c3dfd3
1 changed files with 2 additions and 1 deletions

View File

@ -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);