Browse Source

ios: add feature flag to enable recording on iOS

j8
Saúl Ibarra Corretgé 6 years ago
parent
commit
f7b92f65ca

+ 6
- 0
ios/app/src/AppDelegate.m View File

@@ -46,6 +46,12 @@
46 46
     jitsiMeet.defaultConferenceOptions = [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) {
47 47
         builder.serverURL = [NSURL URLWithString:@"https://meet.jit.si"];
48 48
         builder.welcomePageEnabled = YES;
49
+
50
+        // Apple rejected our app because they claim requiring a
51
+        // Dropbox account for recording is not acceptable.
52
+#if DEBUG
53
+        [builder setFeatureFlag:@"ios.recording.enabled" withBoolean:YES];
54
+#endif
49 55
     }];
50 56
 
51 57
     [jitsiMeet application:application didFinishLaunchingWithOptions:launchOptions];

+ 6
- 0
react/features/base/flags/constants.js View File

@@ -1,5 +1,11 @@
1 1
 // @flow
2 2
 
3
+/**
4
+ * Flag indicating if recording should be enabled in iOS.
5
+ * Default: disabled (false).
6
+ */
7
+export const IOS_RECORDING_ENABLED = 'ios.recording.enabled';
8
+
3 9
 /**
4 10
  * Flag indicating if Picture-in-Picture should be enabled.
5 11
  * Default: auto-detected.

+ 12
- 13
react/features/toolbox/components/native/OverflowMenu.js View File

@@ -4,10 +4,8 @@ import React, { Component } from 'react';
4 4
 import { Platform } from 'react-native';
5 5
 
6 6
 import { ColorSchemeRegistry } from '../../../base/color-scheme';
7
-import {
8
-    BottomSheet,
9
-    hideDialog
10
-} from '../../../base/dialog';
7
+import { BottomSheet, hideDialog } from '../../../base/dialog';
8
+import { IOS_RECORDING_ENABLED, getFeatureFlag } from '../../../base/flags';
11 9
 import { connect } from '../../../base/redux';
12 10
 import { StyleType } from '../../../base/styles';
13 11
 import { InfoDialogButton, InviteButton } from '../../../invite';
@@ -21,8 +19,6 @@ import AudioOnlyButton from './AudioOnlyButton';
21 19
 import RaiseHandButton from './RaiseHandButton';
22 20
 import ToggleCameraButton from './ToggleCameraButton';
23 21
 
24
-declare var __DEV__;
25
-
26 22
 /**
27 23
  * The type of the React {@code Component} props of {@link OverflowMenu}.
28 24
  */
@@ -33,6 +29,11 @@ type Props = {
33 29
      */
34 30
     _bottomSheetStyles: StyleType,
35 31
 
32
+    /**
33
+     * Whether the recoding button should be enabled or not.
34
+     */
35
+    _recordingEnabled: boolean,
36
+
36 37
     /**
37 38
      * Used for hiding the dialog when the selection was completed.
38 39
      */
@@ -86,11 +87,7 @@ class OverflowMenu extends Component<Props> {
86 87
                 <RoomLockButton { ...buttonProps } />
87 88
                 <ClosedCaptionButton { ...buttonProps } />
88 89
                 {
89
-
90
-                    // Apple rejected our app because they claim requiring a
91
-                    // Dropbox account for recording is not acceptable.
92
-                    // Ddisable it until we can find a way around it.
93
-                    (__DEV__ || Platform.OS !== 'ios')
90
+                    this.props._recordingEnabled
94 91
                         && <RecordButton { ...buttonProps } />
95 92
                 }
96 93
                 <LiveStreamButton { ...buttonProps } />
@@ -121,13 +118,15 @@ class OverflowMenu extends Component<Props> {
121 118
  * @param {Object} state - Redux state.
122 119
  * @private
123 120
  * @returns {{
124
- *      _bottomSheetStyles: StyleType
121
+ *      _bottomSheetStyles: StyleType,
122
+ *      _recordingEnabled: boolean
125 123
  *  }}
126 124
  */
127 125
 function _mapStateToProps(state) {
128 126
     return {
129 127
         _bottomSheetStyles:
130
-            ColorSchemeRegistry.get(state, 'BottomSheet')
128
+            ColorSchemeRegistry.get(state, 'BottomSheet'),
129
+        _recordingEnabled: Platform.OS !== 'ios' || getFeatureFlag(state, IOS_RECORDING_ENABLED)
131 130
     };
132 131
 }
133 132
 

Loading…
Cancel
Save