[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); const conference = getCurrentConference(state);
if (jitsiTrack.isLocal() && conference && conference.callUUID) { if (jitsiTrack.isLocal() && conference && conference.callUUID) {
const tracks = state['features/base/tracks']; switch (jitsiTrack.getType()) {
const muted = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO); case 'audio': {
const tracks = state['features/base/tracks'];
const muted = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO);
CallKit.setMuted(conference.callUUID, muted); CallKit.setMuted(conference.callUUID, muted);
CallKit.updateCall( break;
conference.callUUID, }
{ hasVideo: !isVideoMutedByAudioOnly(state) }); case 'video': {
CallKit.updateCall(
conference.callUUID,
{ hasVideo: !isVideoMutedByAudioOnly(state) });
break;
}
}
} }
return result; return result;