fix(av-moderation) Stop screensharing on video mute on native

When the moderator stops the video for the participant stop screensharing (removes the track doesn't just mute it)
This commit is contained in:
robertpin 2021-10-27 12:37:23 +03:00 committed by vp8x8
parent 09d3344c39
commit 76fc5a0806
1 changed files with 8 additions and 1 deletions

View File

@ -158,7 +158,7 @@ MiddlewareRegistry.register(store => next => action => {
}
break;
case TRACK_UPDATED:
case TRACK_UPDATED: {
// TODO Remove the following calls to APP.UI once components interested
// in track mute changes are moved into React and/or redux.
if (typeof APP !== 'undefined') {
@ -192,7 +192,14 @@ MiddlewareRegistry.register(store => next => action => {
return result;
}
const { jitsiTrack } = action.track;
if (jitsiTrack.isMuted()
&& jitsiTrack.type === MEDIA_TYPE.VIDEO && jitsiTrack.videoType === VIDEO_TYPE.DESKTOP) {
store.dispatch(toggleScreensharing(false));
}
break;
}
}
return next(action);