feat(ios): adds ios screensharing enabled flag

This commit is contained in:
tmoldovan8x8 2021-04-07 16:28:26 +03:00 committed by GitHub
parent e5277deed5
commit e803e8cfd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -35,6 +35,7 @@
jitsiMeet.defaultConferenceOptions = [JitsiMeetConferenceOptions fromBuilder:^(JitsiMeetConferenceOptionsBuilder *builder) {
[builder setFeatureFlag:@"resolution" withValue:@(360)];
[builder setFeatureFlag:@"ios.screensharing.enabled" withBoolean:YES];
builder.serverURL = [NSURL URLWithString:@"https://meet.jit.si"];
builder.welcomePageEnabled = YES;

View File

@ -86,6 +86,12 @@ export const INVITE_ENABLED = 'invite.enabled';
*/
export const IOS_RECORDING_ENABLED = 'ios.recording.enabled';
/**
* Flag indicating if screen sharing should be enabled in iOS.
* Default: disabled (false).
*/
export const IOS_SCREENSHARING_ENABLED = 'ios.screensharing.enabled';
/**
* Flag indicating if kickout is enabled.
* Default: enabled (true).

View File

@ -4,6 +4,7 @@ import React from 'react';
import { findNodeHandle, NativeModules, Platform } from 'react-native';
import { ScreenCapturePickerView } from 'react-native-webrtc';
import { getFeatureFlag, IOS_SCREENSHARING_ENABLED } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconShareDesktop } from '../../../base/icons';
import { connect } from '../../../base/redux';
@ -121,11 +122,13 @@ class ScreenSharingIosButton extends AbstractButton<Props, *> {
* }}
*/
function _mapStateToProps(state): Object {
const enabled = getFeatureFlag(state, IOS_SCREENSHARING_ENABLED, false);
return {
_screensharing: isLocalVideoTrackDesktop(state),
// TODO: this should work on iOS 12 too, but our trick to show the picker doesn't work.
visible: Platform.OS === 'ios' && Platform.Version.split('.')[0] >= 14
visible: enabled && Platform.OS === 'ios' && Platform.Version.split('.')[0] >= 14
};
}