feat(toolbox) added android screen share flag

Fixes issue #9435
This commit is contained in:
Calinteodor 2021-08-17 13:42:29 +03:00 committed by GitHub
parent c23375793e
commit 307699a34c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -92,6 +92,12 @@ export const IOS_RECORDING_ENABLED = 'ios.recording.enabled';
*/
export const IOS_SCREENSHARING_ENABLED = 'ios.screensharing.enabled';
/**
* Flag indicating if screen sharing should be enabled in android.
* Default: enabled (true).
*/
export const ANDROID_SCREENSHARING_ENABLED = 'android.screensharing.enabled';
/**
* Flag indicating if kickout is enabled.
* Default: enabled (true).

View File

@ -1,5 +1,9 @@
// @flow
import {
ANDROID_SCREENSHARING_ENABLED,
getFeatureFlag
} from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconShareDesktop } from '../../../base/icons';
import { connect } from '../../../base/redux';
@ -82,8 +86,11 @@ class ScreenSharingAndroidButton extends AbstractButton<Props, *> {
* }}
*/
function _mapStateToProps(state): Object {
const enabled = getFeatureFlag(state, ANDROID_SCREENSHARING_ENABLED, true);
return {
_screensharing: isLocalVideoTrackDesktop(state)
_screensharing: isLocalVideoTrackDesktop(state),
visible: enabled
};
}