Selaa lähdekoodia

feat(ios): adds ios screensharing enabled flag

factor2
tmoldovan8x8 4 vuotta sitten
vanhempi
commit
e803e8cfd9
No account linked to committer's email address

+ 1
- 0
ios/app/src/AppDelegate.m Näytä tiedosto

35
 
35
 
36
     jitsiMeet.defaultConferenceOptions = [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) {
36
     jitsiMeet.defaultConferenceOptions = [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) {
37
         [builder setFeatureFlag:@"resolution" withValue:@(360)];
37
         [builder setFeatureFlag:@"resolution" withValue:@(360)];
38
+        [builder setFeatureFlag:@"ios.screensharing.enabled" withBoolean:YES];
38
         builder.serverURL = [NSURL URLWithString:@"https://meet.jit.si"];
39
         builder.serverURL = [NSURL URLWithString:@"https://meet.jit.si"];
39
         builder.welcomePageEnabled = YES;
40
         builder.welcomePageEnabled = YES;
40
 
41
 

+ 6
- 0
react/features/base/flags/constants.js Näytä tiedosto

86
  */
86
  */
87
 export const IOS_RECORDING_ENABLED = 'ios.recording.enabled';
87
 export const IOS_RECORDING_ENABLED = 'ios.recording.enabled';
88
 
88
 
89
+/**
90
+ * Flag indicating if screen sharing should be enabled in iOS.
91
+ * Default: disabled (false).
92
+ */
93
+export const IOS_SCREENSHARING_ENABLED = 'ios.screensharing.enabled';
94
+
89
 /**
95
 /**
90
  * Flag indicating if kickout is enabled.
96
  * Flag indicating if kickout is enabled.
91
  * Default: enabled (true).
97
  * Default: enabled (true).

+ 4
- 1
react/features/toolbox/components/native/ScreenSharingIosButton.js Näytä tiedosto

4
 import { findNodeHandle, NativeModules, Platform } from 'react-native';
4
 import { findNodeHandle, NativeModules, Platform } from 'react-native';
5
 import { ScreenCapturePickerView } from 'react-native-webrtc';
5
 import { ScreenCapturePickerView } from 'react-native-webrtc';
6
 
6
 
7
+import { getFeatureFlag, IOS_SCREENSHARING_ENABLED } from '../../../base/flags';
7
 import { translate } from '../../../base/i18n';
8
 import { translate } from '../../../base/i18n';
8
 import { IconShareDesktop } from '../../../base/icons';
9
 import { IconShareDesktop } from '../../../base/icons';
9
 import { connect } from '../../../base/redux';
10
 import { connect } from '../../../base/redux';
121
  * }}
122
  * }}
122
  */
123
  */
123
 function _mapStateToProps(state): Object {
124
 function _mapStateToProps(state): Object {
125
+    const enabled = getFeatureFlag(state, IOS_SCREENSHARING_ENABLED, false);
126
+
124
     return {
127
     return {
125
         _screensharing: isLocalVideoTrackDesktop(state),
128
         _screensharing: isLocalVideoTrackDesktop(state),
126
 
129
 
127
         // TODO: this should work on iOS 12 too, but our trick to show the picker doesn't work.
130
         // TODO: this should work on iOS 12 too, but our trick to show the picker doesn't work.
128
-        visible: Platform.OS === 'ios' && Platform.Version.split('.')[0] >= 14
131
+        visible: enabled && Platform.OS === 'ios' && Platform.Version.split('.')[0] >= 14
129
     };
132
     };
130
 }
133
 }
131
 
134
 

Loading…
Peruuta
Tallenna