瀏覽代碼

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,6 +49,12 @@ export const INVITE_ENABLED = 'invite.enabled';
49 49
  */
50 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 59
  * Flag indicating if live-streaming should be enabled.
54 60
  * Default: auto-detected.

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

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

Loading…
取消
儲存