From 8db3a341b38fa68cd3a050a43ef33067a62ad457 Mon Sep 17 00:00:00 2001 From: tudordan7 Date: Mon, 12 Jul 2021 14:28:11 +0300 Subject: [PATCH] fix(virtual-background): Set x scale to default value on desktop share as a virtual background deactivation. --- .../components/VirtualBackgroundDialog.js | 6 ++++++ react/features/virtual-background/functions.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/react/features/virtual-background/components/VirtualBackgroundDialog.js b/react/features/virtual-background/components/VirtualBackgroundDialog.js index 0788f05d9..bcfe9031a 100644 --- a/react/features/virtual-background/components/VirtualBackgroundDialog.js +++ b/react/features/virtual-background/components/VirtualBackgroundDialog.js @@ -389,6 +389,12 @@ function VirtualBackground({ dispatch(updateSettings({ localFlipX: !_localFlipX })); + } else { + + // Set x scale to default value. + dispatch(updateSettings({ + localFlipX: true + })); } dispatch(hideDialog()); }, [ dispatch, options, _localFlipX ]); diff --git a/react/features/virtual-background/functions.js b/react/features/virtual-background/functions.js index 3d0b38749..dab0d88ee 100644 --- a/react/features/virtual-background/functions.js +++ b/react/features/virtual-background/functions.js @@ -1,6 +1,7 @@ // @flow import { JitsiTrackEvents } from '../base/lib-jitsi-meet'; +import { updateSettings } from '../base/settings'; import { toggleBackgroundEffect } from './actions'; let filterSupport; @@ -110,5 +111,10 @@ export function localTrackStopped(dispatch: Function, desktopTrack: Object, curr desktopTrack && desktopTrack.on(JitsiTrackEvents.LOCAL_TRACK_STOPPED, () => { dispatch(toggleBackgroundEffect(noneOptions, currentLocalTrack)); + + // Set x scale to default value. + dispatch(updateSettings({ + localFlipX: true + })); }); }