From b9b8090996b6d3e50932122463ac031473a8594d Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty <54324652+jallamsetty1@users.noreply.github.com> Date: Tue, 5 Jul 2022 17:37:06 -0400 Subject: [PATCH] fix(Toolbox) Render the virtual background button in multi-stream mode. In multi-stream mode, both camera and desktop streams are available at the same time. Virtual backgrounds can be applied to the camera stream while screensharing is in progress. --- react/features/toolbox/components/web/Toolbox.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.js index c76f2d43d..5222369a2 100644 --- a/react/features/toolbox/components/web/Toolbox.js +++ b/react/features/toolbox/components/web/Toolbox.js @@ -12,7 +12,7 @@ import { sendAnalytics } from '../../../analytics'; import { ContextMenu, ContextMenuItemGroup } from '../../../base/components'; -import { getToolbarButtons } from '../../../base/config'; +import { getMultipleVideoSendingSupportFeatureFlag, getToolbarButtons } from '../../../base/config'; import { isToolbarButtonEnabled } from '../../../base/config/functions.web'; import { openDialog, toggleDialog } from '../../../base/dialog'; import { isIosMobileBrowser, isMobileBrowser } from '../../../base/environment/utils'; @@ -205,7 +205,12 @@ type Props = { _localVideo: Object, /** - *Whether or not the overflow menu is displayed in a drawer drawer. + * Whether or not multi-stream send support is enabled. + */ + _multiStreamModeEnabled: boolean, + + /** + * Whether or not the overflow menu is displayed in a drawer drawer. */ _overflowDrawer: boolean, @@ -631,6 +636,7 @@ class Toolbox extends Component { _isIosMobile, _isMobile, _hasSalesforce, + _multiStreamModeEnabled, _screenSharing } = this.props; @@ -761,7 +767,7 @@ class Toolbox extends Component { group: 3 }; - const virtualBackground = !_screenSharing && { + const virtualBackground = (_multiStreamModeEnabled || !_screenSharing) && { key: 'select-background', Content: VideoBackgroundButton, group: 3 @@ -1445,6 +1451,7 @@ function _mapStateToProps(state, ownProps) { _hasSalesforce: isSalesforceEnabled(state), _localParticipantID: localParticipant?.id, _localVideo: localVideo, + _multiStreamModeEnabled: getMultipleVideoSendingSupportFeatureFlag(state), _overflowMenuVisible: overflowMenuVisible, _overflowDrawer: overflowDrawer, _participantsPaneOpen: getParticipantsPaneOpen(state),