瀏覽代碼

Adding the flags to enable/disable Kick out option in RemoteVideoMenu

master
Anand Parshuramka 4 年之前
父節點
當前提交
f01869c21c

+ 6
- 0
react/features/base/flags/constants.js 查看文件

49
  */
49
  */
50
 export const IOS_RECORDING_ENABLED = 'ios.recording.enabled';
50
 export const IOS_RECORDING_ENABLED = 'ios.recording.enabled';
51
 
51
 
52
+/**
53
+ * Flag indicating if kickout is enabled.
54
+ * Default: enabled (true).
55
+ */
56
+export const KICK_OUT_ENABLED = 'kick-out.enabled';
57
+
52
 /**
58
 /**
53
  * Flag indicating if live-streaming should be enabled.
59
  * Flag indicating if live-streaming should be enabled.
54
  * Default: auto-detected.
60
  * Default: auto-detected.

+ 5
- 1
react/features/remote-video-menu/components/native/RemoteVideoMenu.js 查看文件

6
 import { Avatar } from '../../../base/avatar';
6
 import { Avatar } from '../../../base/avatar';
7
 import { ColorSchemeRegistry } from '../../../base/color-scheme';
7
 import { ColorSchemeRegistry } from '../../../base/color-scheme';
8
 import { BottomSheet, isDialogOpen } from '../../../base/dialog';
8
 import { BottomSheet, isDialogOpen } from '../../../base/dialog';
9
+import { KICK_OUT_ENABLED, getFeatureFlag } from '../../../base/flags';
9
 import { getParticipantDisplayName } from '../../../base/participants';
10
 import { getParticipantDisplayName } from '../../../base/participants';
10
 import { connect } from '../../../base/redux';
11
 import { connect } from '../../../base/redux';
11
 import { StyleType } from '../../../base/styles';
12
 import { StyleType } from '../../../base/styles';
151
  * @returns {Props}
152
  * @returns {Props}
152
  */
153
  */
153
 function _mapStateToProps(state, ownProps) {
154
 function _mapStateToProps(state, ownProps) {
155
+    const kickOutEnabled = getFeatureFlag(state, KICK_OUT_ENABLED, true);
154
     const { participant } = ownProps;
156
     const { participant } = ownProps;
155
     const { remoteVideoMenu = {}, disableRemoteMute } = state['features/base/config'];
157
     const { remoteVideoMenu = {}, disableRemoteMute } = state['features/base/config'];
156
-    const { disableKick } = remoteVideoMenu;
158
+    let { disableKick } = remoteVideoMenu;
159
+
160
+    disableKick = disableKick || !kickOutEnabled;
157
 
161
 
158
     return {
162
     return {
159
         _bottomSheetStyles: ColorSchemeRegistry.get(state, 'BottomSheet'),
163
         _bottomSheetStyles: ColorSchemeRegistry.get(state, 'BottomSheet'),

Loading…
取消
儲存