Explorar el Código

Add: remoteVideoMenu.disableGrantModerator option (#7534)

* Add: remoteVideoMenu.disableGrantModerator option

* Add disableGrantModerator to native side

* Update RemoteVideoMenu.js

* Update RemoteVideoMenuTriggerButton.js

Co-authored-by: ouya99 <alexander@andlabs.eu>
master
Christoph Wiechert hace 4 años
padre
commit
79497cecba
No account linked to committer's email address

+ 3
- 1
config.js Ver fichero

671
     // Options related to the remote participant menu.
671
     // Options related to the remote participant menu.
672
     // remoteVideoMenu: {
672
     // remoteVideoMenu: {
673
     //     // If set to true the 'Kick out' button will be disabled.
673
     //     // If set to true the 'Kick out' button will be disabled.
674
-    //     disableKick: true
674
+    //     disableKick: true,
675
+    //     // If set to true the 'Grant moderator' button will be disabled.
676
+    //     disableGrantModerator: true
675
     // },
677
     // },
676
 
678
 
677
     // If set to true all muting operations of remote participants will be disabled.
679
     // If set to true all muting operations of remote participants will be disabled.

+ 7
- 2
react/features/video-menu/components/native/RemoteVideoMenu.js Ver fichero

53
      */
53
      */
54
     _disableRemoteMute: boolean,
54
     _disableRemoteMute: boolean,
55
 
55
 
56
+    /**
57
+     * Whether or not to display the grant moderator button.
58
+     */
59
+    _disableGrantModerator: Boolean,
60
+
56
     /**
61
     /**
57
      * True if the menu is currently open, false otherwise.
62
      * True if the menu is currently open, false otherwise.
58
      */
63
      */
89
      * @inheritdoc
94
      * @inheritdoc
90
      */
95
      */
91
     render() {
96
     render() {
92
-        const { _disableKick, _disableRemoteMute, participant } = this.props;
97
+        const { _disableKick, _disableRemoteMute, _disableGrantModerator, participant } = this.props;
93
         const buttonProps = {
98
         const buttonProps = {
94
             afterClick: this._onCancel,
99
             afterClick: this._onCancel,
95
             showLabel: true,
100
             showLabel: true,
103
                 renderHeader = { this._renderMenuHeader }>
108
                 renderHeader = { this._renderMenuHeader }>
104
                 { !_disableRemoteMute && <MuteButton { ...buttonProps } /> }
109
                 { !_disableRemoteMute && <MuteButton { ...buttonProps } /> }
105
                 { !_disableKick && <KickButton { ...buttonProps } /> }
110
                 { !_disableKick && <KickButton { ...buttonProps } /> }
106
-                <GrantModeratorButton { ...buttonProps } />
111
+                { !_disableGrantModerator && <GrantModeratorButton { ...buttonProps } /> }
107
                 <PinButton { ...buttonProps } />
112
                 <PinButton { ...buttonProps } />
108
                 <PrivateMessageButton { ...buttonProps } />
113
                 <PrivateMessageButton { ...buttonProps } />
109
                 <MuteEveryoneElseButton { ...buttonProps } />
114
                 <MuteEveryoneElseButton { ...buttonProps } />

+ 16
- 7
react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js Ver fichero

43
      */
43
      */
44
     _disableRemoteMute: Boolean,
44
     _disableRemoteMute: Boolean,
45
 
45
 
46
+    /**
47
+     * Whether or not to display the grant moderator button.
48
+     */
49
+    _disableGrantModerator: Boolean,
50
+
46
     /**
51
     /**
47
      * Whether or not the participant is a conference moderator.
52
      * Whether or not the participant is a conference moderator.
48
      */
53
      */
136
         const {
141
         const {
137
             _disableKick,
142
             _disableKick,
138
             _disableRemoteMute,
143
             _disableRemoteMute,
144
+            _disableGrantModerator,
139
             _isModerator,
145
             _isModerator,
140
             dispatch,
146
             dispatch,
141
             initialVolumeValue,
147
             initialVolumeValue,
170
                 );
176
                 );
171
             }
177
             }
172
 
178
 
173
-            buttons.push(
174
-                <GrantModeratorButton
175
-                    key = 'grant-moderator'
176
-                    participantID = { participantID } />
177
-            );
179
+            if (!_disableGrantModerator) {
180
+                buttons.push(
181
+                    <GrantModeratorButton
182
+                        key = 'grant-moderator'
183
+                        participantID = { participantID } />
184
+                );
185
+            }
178
 
186
 
179
             if (!_disableKick) {
187
             if (!_disableKick) {
180
                 buttons.push(
188
                 buttons.push(
242
     const { participantID } = ownProps;
250
     const { participantID } = ownProps;
243
     const localParticipant = getLocalParticipant(state);
251
     const localParticipant = getLocalParticipant(state);
244
     const { remoteVideoMenu = {}, disableRemoteMute } = state['features/base/config'];
252
     const { remoteVideoMenu = {}, disableRemoteMute } = state['features/base/config'];
245
-    const { disableKick } = remoteVideoMenu;
253
+    const { disableKick, disableGrantModerator } = remoteVideoMenu;
246
     let _remoteControlState = null;
254
     let _remoteControlState = null;
247
     const participant = getParticipantById(state, participantID);
255
     const participant = getParticipantById(state, participantID);
248
     const _isRemoteControlSessionActive = participant?.remoteControlSessionStatus ?? false;
256
     const _isRemoteControlSessionActive = participant?.remoteControlSessionStatus ?? false;
283
         _disableRemoteMute: Boolean(disableRemoteMute),
291
         _disableRemoteMute: Boolean(disableRemoteMute),
284
         _remoteControlState,
292
         _remoteControlState,
285
         _menuPosition,
293
         _menuPosition,
286
-        _overflowDrawer: overflowDrawer
294
+        _overflowDrawer: overflowDrawer,
295
+        _disableGrantModerator: Boolean(disableGrantModerator)
287
     };
296
     };
288
 }
297
 }
289
 
298
 

Loading…
Cancelar
Guardar