[iOS] Fix checking if a track is local in ithe CallKit middleware

Not all TRACK_ actions include the `local` attribute, so use the underlying
`jitsiTrack` to check it.
This commit is contained in:
Saúl Ibarra Corretgé
2018-06-22 11:25:09 +02:00
committed by Paweł Domas
parent 2bd0f77671
commit 42b85f73bd
+2 -2
View File
@@ -380,11 +380,11 @@ function _setCallKitSubscriptions({ getState }, next, action) {
*/
function _syncTrackState({ getState }, next, action) {
const result = next(action);
const { track } = action;
const { jitsiTrack } = action.track;
const state = getState();
const conference = getCurrentConference(state);
if (track.local && conference && conference.callUUID) {
if (jitsiTrack.isLocal() && conference && conference.callUUID) {
const tracks = state['features/base/tracks'];
const muted = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO);