From 23b4e93ed9c04e3500c03c7b66ca592fad9f1974 Mon Sep 17 00:00:00 2001 From: Shawn Chin Date: Fri, 28 Jan 2022 13:35:01 +0000 Subject: [PATCH] feat(config) add ability to hide dominant speaker badge --- config.js | 5 ++++- react/features/base/config/configWhitelist.js | 1 + .../conference/components/web/Conference.js | 2 +- react/features/toolbox/components/web/Toolbox.js | 16 +++++++++------- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/config.js b/config.js index 538ab7cd4..da2e2c1a6 100644 --- a/config.js +++ b/config.js @@ -506,7 +506,10 @@ var config = { // defaultRemoteDisplayName: 'Fellow Jitster', // Hides the display name from the participant thumbnail - // hideDisplayName: false + // hideDisplayName: false, + + // Hides the dominant speaker name badge that hovers above the toolbox + // hideDominantSpeakerBadge: false, // Default language for the user interface. // defaultLanguage: 'en', diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.js index cc480e4f9..58c854114 100644 --- a/react/features/base/config/configWhitelist.js +++ b/react/features/base/config/configWhitelist.js @@ -162,6 +162,7 @@ export default [ 'hiddenPremeetingButtons', 'hideConferenceSubject', 'hideDisplayName', + 'hideDominantSpeakerBadge', 'hideRecordingLabel', 'hideParticipantsStats', 'hideConferenceTimer', diff --git a/react/features/conference/components/web/Conference.js b/react/features/conference/components/web/Conference.js index 0f6340c94..815aefb28 100644 --- a/react/features/conference/components/web/Conference.js +++ b/react/features/conference/components/web/Conference.js @@ -238,7 +238,7 @@ class Conference extends AbstractConference { - { _showPrejoin || _showLobby || } + { _showPrejoin || _showLobby || } {_notificationsVisible && (_overflowDrawer diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.js index d90d26559..b7265ab4f 100644 --- a/react/features/toolbox/components/web/Toolbox.js +++ b/react/features/toolbox/components/web/Toolbox.js @@ -220,6 +220,11 @@ type Props = { */ _sharingVideo: boolean, + /** + * Whether or not to show dominant speaker badge. + */ + _showDominantSpeakerBadge: boolean, + /** * Whether or not the tile view is enabled. */ @@ -250,11 +255,6 @@ type Props = { */ dispatch: Function, - /** - * If the dominant speaker name should be displayed or not. - */ - showDominantSpeakerName?: boolean, - /** * Invoked to obtain translated strings. */ @@ -1258,8 +1258,8 @@ class Toolbox extends Component { _overflowMenuVisible, _reactionsEnabled, _toolbarButtons, + _showDominantSpeakerBadge, classes, - showDominantSpeakerName, t } = this.props; @@ -1278,7 +1278,7 @@ class Toolbox extends Component { onMouseOver: this._onMouseOver }) }> - { showDominantSpeakerName && } + { _showDominantSpeakerBadge && }
{mainMenuButtons.map(({ Content, key, ...rest }) => Content !== Separator && ( @@ -1349,6 +1349,7 @@ function _mapStateToProps(state, ownProps) { callStatsID, disableProfile, enableFeaturesBasedOnToken, + hideDominantSpeakerBadge, buttonsWithNotifyClick } = state['features/base/config']; const { @@ -1404,6 +1405,7 @@ function _mapStateToProps(state, ownProps) { _raisedHand: hasRaisedHand(localParticipant), _reactionsEnabled: isReactionsEnabled(state), _screenSharing: isScreenVideoShared(state), + _showDominantSpeakerBadge: !hideDominantSpeakerBadge, _tileViewEnabled: shouldDisplayTileView(state), _toolbarButtons: toolbarButtons, _virtualSource: state['features/virtual-background'].virtualSource,