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:
parent
ed5351d250
commit
9855fac805
|
@ -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;
|
||||||
|
if (config.enableScreenshotCapture) {
|
||||||
APP.store.dispatch(toggleScreenshotCaptureEffect(true));
|
APP.store.dispatch(toggleScreenshotCaptureEffect(true));
|
||||||
|
}
|
||||||
sendAnalytics(createScreenSharingEvent('started'));
|
sendAnalytics(createScreenSharingEvent('started'));
|
||||||
logger.log('Screen sharing started');
|
logger.log('Screen sharing started');
|
||||||
})
|
})
|
||||||
|
|
|
@ -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.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -96,6 +96,7 @@ export default [
|
||||||
'enableLayerSuspension',
|
'enableLayerSuspension',
|
||||||
'enableLipSync',
|
'enableLipSync',
|
||||||
'enableRemb',
|
'enableRemb',
|
||||||
|
'enableScreenshotCapture',
|
||||||
'enableTalkWhileMuted',
|
'enableTalkWhileMuted',
|
||||||
'enableNoAudioDetection',
|
'enableNoAudioDetection',
|
||||||
'enableNoisyMicDetection',
|
'enableNoisyMicDetection',
|
||||||
|
|
|
@ -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'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue