Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

Jaya Allamsetty9855fac80590
diff --git a/conference.js b/conference.js
index 9244f2e423..f329dedd54 100644
--- a/conference.js
+++ b/conference.js
@@ -1460,8 +1460,9 @@ export default {
} else {
promise = promise.then(() => this.useVideoStream(null));
}
-
- APP.store.dispatch(toggleScreenshotCaptureEffect(false));
+ if (config.enableScreenshotCapture) {
+ APP.store.dispatch(toggleScreenshotCaptureEffect(false));
+ }
return promise.then(
() => {
@@ -1734,7 +1735,9 @@ export default {
.then(stream => this.useVideoStream(stream))
.then(() => {
this.videoSwitchInProgress = false;
- APP.store.dispatch(toggleScreenshotCaptureEffect(true));
+ if (config.enableScreenshotCapture) {
+ APP.store.dispatch(toggleScreenshotCaptureEffect(true));
+ }
sendAnalytics(createScreenSharingEvent('started'));
logger.log('Screen sharing started');
})
diff --git a/interface_config.js b/interface_config.js
index e220ae13a2..4da482840f 100644
--- a/interface_config.js
+++ b/interface_config.js
@@ -190,11 +190,6 @@ var interfaceConfig = {
*/
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.
*/
diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.js
index cb4677a7b1..791f26d123 100644
--- a/react/features/base/config/configWhitelist.js
+++ b/react/features/base/config/configWhitelist.js
@@ -96,6 +96,7 @@ export default [
'enableLayerSuspension',
'enableLipSync',
'enableRemb',
+ 'enableScreenshotCapture',
'enableTalkWhileMuted',
'enableNoAudioDetection',
'enableNoisyMicDetection',
diff --git a/react/features/stream-effects/screenshot-capture/ScreenshotCaptureEffect.js b/react/features/stream-effects/screenshot-capture/ScreenshotCaptureEffect.js
index 24fd3bfbd2..b940ab6fe4 100644
--- a/react/features/stream-effects/screenshot-capture/ScreenshotCaptureEffect.js
+++ b/react/features/stream-effects/screenshot-capture/ScreenshotCaptureEffect.js
@@ -57,11 +57,7 @@ export default class ScreenshotCaptureEffect {
* @returns {boolean} - Returns true if this effect can run on the specified track, false otherwise.
*/
isEnabled(jitsiLocalTrack: Object) {
- return (
- interfaceConfig.ENABLE_SCREENSHOT_CAPTURE
- && jitsiLocalTrack.isVideoTrack()
- && jitsiLocalTrack.videoType === 'desktop'
- );
+ return jitsiLocalTrack.isVideoTrack() && jitsiLocalTrack.videoType === 'desktop';
}
/**