Skip to content

Commit

Permalink
fix(screenshot-capture): Move the flag for enabling/disabling the fea…
Browse files Browse the repository at this point in the history
…ture to config.js

This will let us enable/disable the feature based on environment/deployment
  • Loading branch information
jallamsetty1 committed Feb 5, 2020
1 parent ed5351d commit 9855fac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
9 changes: 6 additions & 3 deletions conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
() => {
Expand Down Expand Up @@ -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');
})
Expand Down
5 changes: 0 additions & 5 deletions interface_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
1 change: 1 addition & 0 deletions react/features/base/config/configWhitelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default [
'enableLayerSuspension',
'enableLipSync',
'enableRemb',
'enableScreenshotCapture',
'enableTalkWhileMuted',
'enableNoAudioDetection',
'enableNoisyMicDetection',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand Down

0 comments on commit 9855fac

Please sign in to comment.