diff --git a/config.js b/config.js index 057daac87..624fad238 100644 --- a/config.js +++ b/config.js @@ -671,7 +671,9 @@ var config = { // Options related to the remote participant menu. // remoteVideoMenu: { // // If set to true the 'Kick out' button will be disabled. - // disableKick: true + // disableKick: true, + // // If set to true the 'Grant moderator' button will be disabled. + // disableGrantModerator: true // }, // If set to true all muting operations of remote participants will be disabled. diff --git a/react/features/video-menu/components/native/RemoteVideoMenu.js b/react/features/video-menu/components/native/RemoteVideoMenu.js index b0878c4d1..786ba0b4c 100644 --- a/react/features/video-menu/components/native/RemoteVideoMenu.js +++ b/react/features/video-menu/components/native/RemoteVideoMenu.js @@ -53,6 +53,11 @@ type Props = { */ _disableRemoteMute: boolean, + /** + * Whether or not to display the grant moderator button. + */ + _disableGrantModerator: Boolean, + /** * True if the menu is currently open, false otherwise. */ @@ -89,7 +94,7 @@ class RemoteVideoMenu extends PureComponent { * @inheritdoc */ render() { - const { _disableKick, _disableRemoteMute, participant } = this.props; + const { _disableKick, _disableRemoteMute, _disableGrantModerator, participant } = this.props; const buttonProps = { afterClick: this._onCancel, showLabel: true, @@ -103,7 +108,7 @@ class RemoteVideoMenu extends PureComponent { renderHeader = { this._renderMenuHeader }> { !_disableRemoteMute && } { !_disableKick && } - + { !_disableGrantModerator && } diff --git a/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js b/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js index 2d5d8b9c9..97d1c6323 100644 --- a/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js +++ b/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js @@ -43,6 +43,11 @@ type Props = { */ _disableRemoteMute: Boolean, + /** + * Whether or not to display the grant moderator button. + */ + _disableGrantModerator: Boolean, + /** * Whether or not the participant is a conference moderator. */ @@ -136,6 +141,7 @@ class RemoteVideoMenuTriggerButton extends Component { const { _disableKick, _disableRemoteMute, + _disableGrantModerator, _isModerator, dispatch, initialVolumeValue, @@ -170,11 +176,13 @@ class RemoteVideoMenuTriggerButton extends Component { ); } - buttons.push( - - ); + if (!_disableGrantModerator) { + buttons.push( + + ); + } if (!_disableKick) { buttons.push( @@ -242,7 +250,7 @@ function _mapStateToProps(state, ownProps) { const { participantID } = ownProps; const localParticipant = getLocalParticipant(state); const { remoteVideoMenu = {}, disableRemoteMute } = state['features/base/config']; - const { disableKick } = remoteVideoMenu; + const { disableKick, disableGrantModerator } = remoteVideoMenu; let _remoteControlState = null; const participant = getParticipantById(state, participantID); const _isRemoteControlSessionActive = participant?.remoteControlSessionStatus ?? false; @@ -283,7 +291,8 @@ function _mapStateToProps(state, ownProps) { _disableRemoteMute: Boolean(disableRemoteMute), _remoteControlState, _menuPosition, - _overflowDrawer: overflowDrawer + _overflowDrawer: overflowDrawer, + _disableGrantModerator: Boolean(disableGrantModerator) }; }