From fb9d35a99176f0e6dbe1015a8bfec9af9b6cc888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 29 Aug 2022 20:51:40 +0200 Subject: [PATCH] fix(rn,tracks) fix muting local screenshare when remote is muted A "is local" check was missing. --- react/features/base/tracks/middleware.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/react/features/base/tracks/middleware.js b/react/features/base/tracks/middleware.js index ea1353256..b71dcd1a5 100644 --- a/react/features/base/tracks/middleware.js +++ b/react/features/base/tracks/middleware.js @@ -218,10 +218,12 @@ MiddlewareRegistry.register(store => next => action => { return result; } - const { jitsiTrack } = action.track; - if (jitsiTrack.isMuted() - && jitsiTrack.type === MEDIA_TYPE.VIDEO && jitsiTrack.videoType === VIDEO_TYPE.DESKTOP) { + // Mobile. + const { jitsiTrack, local } = action.track; + + if (local && jitsiTrack.isMuted() + && jitsiTrack.type === MEDIA_TYPE.VIDEO && jitsiTrack.videoType === VIDEO_TYPE.DESKTOP) { store.dispatch(toggleScreensharing(false)); } break;