[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:
parent
2bd0f77671
commit
42b85f73bd
|
@ -380,11 +380,11 @@ function _setCallKitSubscriptions({ getState }, next, action) {
|
||||||
*/
|
*/
|
||||||
function _syncTrackState({ getState }, next, action) {
|
function _syncTrackState({ getState }, next, action) {
|
||||||
const result = next(action);
|
const result = next(action);
|
||||||
const { track } = action;
|
const { jitsiTrack } = action.track;
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const conference = getCurrentConference(state);
|
const conference = getCurrentConference(state);
|
||||||
|
|
||||||
if (track.local && conference && conference.callUUID) {
|
if (jitsiTrack.isLocal() && conference && conference.callUUID) {
|
||||||
const tracks = state['features/base/tracks'];
|
const tracks = state['features/base/tracks'];
|
||||||
const muted = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO);
|
const muted = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue