fix(screenshot-capture): Move the flag for enabling/disabling the feature to config.js

This will let us enable/disable the feature based on environment/deployment
This commit is contained in:
Jaya Allamsetty 2020-02-05 16:18:53 -05:00 committed by Jaya Allamsetty
parent ed5351d250
commit 9855fac805
4 changed files with 8 additions and 13 deletions

View File

@ -1460,8 +1460,9 @@ export default {
} else { } else {
promise = promise.then(() => this.useVideoStream(null)); promise = promise.then(() => this.useVideoStream(null));
} }
if (config.enableScreenshotCapture) {
APP.store.dispatch(toggleScreenshotCaptureEffect(false)); APP.store.dispatch(toggleScreenshotCaptureEffect(false));
}
return promise.then( return promise.then(
() => { () => {
@ -1734,7 +1735,9 @@ export default {
.then(stream => this.useVideoStream(stream)) .then(stream => this.useVideoStream(stream))
.then(() => { .then(() => {
this.videoSwitchInProgress = false; this.videoSwitchInProgress = false;
APP.store.dispatch(toggleScreenshotCaptureEffect(true)); if (config.enableScreenshotCapture) {
APP.store.dispatch(toggleScreenshotCaptureEffect(true));
}
sendAnalytics(createScreenSharingEvent('started')); sendAnalytics(createScreenSharingEvent('started'));
logger.log('Screen sharing started'); logger.log('Screen sharing started');
}) })

View File

@ -190,11 +190,6 @@ var interfaceConfig = {
*/ */
AUTO_PIN_LATEST_SCREEN_SHARE: 'remote-only', AUTO_PIN_LATEST_SCREEN_SHARE: 'remote-only',
/**
* If we should capture periodic screenshots of the content sharing.
*/
ENABLE_SCREENSHOT_CAPTURE: false,
/** /**
* If true, presence status: busy, calling, connected etc. is not displayed. * If true, presence status: busy, calling, connected etc. is not displayed.
*/ */

View File

@ -96,6 +96,7 @@ export default [
'enableLayerSuspension', 'enableLayerSuspension',
'enableLipSync', 'enableLipSync',
'enableRemb', 'enableRemb',
'enableScreenshotCapture',
'enableTalkWhileMuted', 'enableTalkWhileMuted',
'enableNoAudioDetection', 'enableNoAudioDetection',
'enableNoisyMicDetection', 'enableNoisyMicDetection',

View File

@ -57,11 +57,7 @@ export default class ScreenshotCaptureEffect {
* @returns {boolean} - Returns true if this effect can run on the specified track, false otherwise. * @returns {boolean} - Returns true if this effect can run on the specified track, false otherwise.
*/ */
isEnabled(jitsiLocalTrack: Object) { isEnabled(jitsiLocalTrack: Object) {
return ( return jitsiLocalTrack.isVideoTrack() && jitsiLocalTrack.videoType === 'desktop';
interfaceConfig.ENABLE_SCREENSHOT_CAPTURE
&& jitsiLocalTrack.isVideoTrack()
&& jitsiLocalTrack.videoType === 'desktop'
);
} }
/** /**