diff --git a/config.js b/config.js index ddee82c2c..15a5cc210 100644 --- a/config.js +++ b/config.js @@ -921,6 +921,9 @@ var config = { // Only the default ones from will be available. // disableAddingBackgroundImages: false, + // Disables using screensharing as virtual background. + // disableScreensharingVirtualBackground: false, + // Sets the background transparency level. '0' is fully transparent, '1' is opaque. // backgroundAlpha: 1, diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.js index 283ee9010..bb202cdaf 100644 --- a/react/features/base/config/configWhitelist.js +++ b/react/features/base/config/configWhitelist.js @@ -109,6 +109,7 @@ export default [ 'disableRemoteMute', 'disableResponsiveTiles', 'disableRtx', + 'disableScreensharingVirtualBackground', 'disableShortcuts', 'disableShowMoreStats', 'disableRemoveRaisedHandOnFocus', diff --git a/react/features/virtual-background/components/VirtualBackgroundDialog.js b/react/features/virtual-background/components/VirtualBackgroundDialog.js index 97459ae34..9b6916c06 100644 --- a/react/features/virtual-background/components/VirtualBackgroundDialog.js +++ b/react/features/virtual-background/components/VirtualBackgroundDialog.js @@ -4,6 +4,7 @@ import Spinner from '@atlaskit/spinner'; import Bourne from '@hapi/bourne'; import { jitsiLocalStorage } from '@jitsi/js-utils/jitsi-local-storage'; import React, { useState, useEffect, useCallback } from 'react'; +import { useSelector } from 'react-redux'; import { Dialog, hideDialog, openDialog } from '../../base/dialog'; import { translate } from '../../base/i18n'; @@ -126,6 +127,7 @@ function VirtualBackground({ const localImages = jitsiLocalStorage.getItem('virtualBackgrounds'); const [ storedImages, setStoredImages ] = useState>((localImages && Bourne.parse(localImages)) || []); const [ loading, setLoading ] = useState(false); + const { disableScreensharingVirtualBackground } = useSelector(state => state['features/base/config']); const [ activeDesktopVideo ] = useState(_virtualBackground?.virtualSource?.videoType === VIDEO_TYPE.DESKTOP ? _virtualBackground.virtualSource @@ -197,6 +199,10 @@ function VirtualBackground({ const shareDesktop = useCallback(async () => { + if (disableScreensharingVirtualBackground) { + return; + } + let isCancelled = false, url; try { @@ -438,25 +444,27 @@ function VirtualBackground({ {t('virtualBackground.blur')} - -
- -
-
+ {!disableScreensharingVirtualBackground && ( + +
+ +
+
+ )} {_images.map(image => (