Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Add: remoteVideoMenu.disableGrantModerator option (#7534)

Christoph Wiechert79497cecba0d
diff --git a/config.js b/config.js
index 057daac87a..624fad238a 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 b0878c4d1d..786ba0b4c4 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<Props> {
* @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<Props> {
renderHeader = { this._renderMenuHeader }>
{ !_disableRemoteMute && <MuteButton { ...buttonProps } /> }
{ !_disableKick && <KickButton { ...buttonProps } /> }
- <GrantModeratorButton { ...buttonProps } />
+ { !_disableGrantModerator && <GrantModeratorButton { ...buttonProps } /> }
<PinButton { ...buttonProps } />
<PrivateMessageButton { ...buttonProps } />
<MuteEveryoneElseButton { ...buttonProps } />
diff --git a/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js b/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js
index 2d5d8b9c95..97d1c6323e 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<Props> {
const {
_disableKick,
_disableRemoteMute,
+ _disableGrantModerator,
_isModerator,
dispatch,
initialVolumeValue,
@@ -170,11 +176,13 @@ class RemoteVideoMenuTriggerButton extends Component<Props> {
);
}
- buttons.push(
- <GrantModeratorButton
- key = 'grant-moderator'
- participantID = { participantID } />
- );
+ if (!_disableGrantModerator) {
+ buttons.push(
+ <GrantModeratorButton
+ key = 'grant-moderator'
+ participantID = { participantID } />
+ );
+ }
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)
};
}