[iOS] Only update the matching local track data in CallKit

This commit is contained in:
Saúl Ibarra Corretgé 2018-06-21 16:07:56 +02:00 committed by Paweł Domas
parent 42b85f73bd
commit ec8ad6190d
1 changed files with 15 additions and 6 deletions

View File

@ -385,13 +385,22 @@ function _syncTrackState({ getState }, next, action) {
const conference = getCurrentConference(state);
if (jitsiTrack.isLocal() && conference && conference.callUUID) {
switch (jitsiTrack.getType()) {
case 'audio': {
const tracks = state['features/base/tracks'];
const muted = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO);
CallKit.setMuted(conference.callUUID, muted);
break;
}
case 'video': {
CallKit.updateCall(
conference.callUUID,
{ hasVideo: !isVideoMutedByAudioOnly(state) });
break;
}
}
}
return result;