Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(screenshot-capture) Use feature on web only
robertpind96ecc5b656a
diff --git a/react/features/recording/components/Recording/AbstractStartRecordingDialog.js b/react/features/recording/components/Recording/AbstractStartRecordingDialog.jsindex 2f7417c5fa..4028281fc4 100644--- a/react/features/recording/components/Recording/AbstractStartRecordingDialog.js+++ b/react/features/recording/components/Recording/AbstractStartRecordingDialog.js@@ -14,8 +14,6 @@ import {updateDropboxToken} from '../../../dropbox';import { NOTIFICATION_TIMEOUT_TYPE, showErrorNotification } from '../../../notifications';-import { isScreenVideoShared } from '../../../screen-share';-import { toggleScreenshotCaptureSummary } from '../../../screenshot-capture';import { toggleRequestingSubtitles } from '../../../subtitles';import { setSelectedRecordingService } from '../../actions';import { RECORDING_TYPES } from '../../constants';@@ -64,6 +62,11 @@ type Props = {*/_screensharing: boolean,+ /**+ * Whether or not the screenshot capture feature is enabled.+ */+ _screenshotCaptureEnabled: boolean,+/*** Access token's expiration date as UNIX timestamp.*/@@ -135,6 +138,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {this._onSelectedRecordingServiceChanged= this._onSelectedRecordingServiceChanged.bind(this);this._onSharingSettingChanged = this._onSharingSettingChanged.bind(this);+ this._toggleScreenshotCapture = this._toggleScreenshotCapture.bind(this);let selectedRecordingService;@@ -283,7 +287,6 @@ class AbstractStartRecordingDialog extends Component<Props, State> {_conference,_isDropboxEnabled,_rToken,- _screensharing,_token,dispatch} = this.props;@@ -323,9 +326,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {createRecordingDialogEvent('start', 'confirm.button', attributes));- if (_screensharing) {- dispatch(toggleScreenshotCaptureSummary(true));- }+ this._toggleScreenshotCapture();_conference.startRecording({mode: JitsiRecordingConstants.mode.FILE,appData@@ -338,6 +339,11 @@ class AbstractStartRecordingDialog extends Component<Props, State> {return true;}+ /**+ * To be overwritten by web component.+ */+ _toggleScreenshotCapture:() => void;+/*** Renders the platform specific dialog content.*@@ -381,7 +387,6 @@ export function mapStateToProps(state: Object) {_fileRecordingsServiceSharingEnabled: fileRecordingsServiceSharingEnabled,_isDropboxEnabled: isDropboxEnabled(state),_rToken: state['features/dropbox'].rToken,- _screensharing: isScreenVideoShared(state),_tokenExpireDate: state['features/dropbox'].expireDate,_token: state['features/dropbox'].token};diff --git a/react/features/recording/components/Recording/AbstractStopRecordingDialog.js b/react/features/recording/components/Recording/AbstractStopRecordingDialog.jsindex 2f5aab2356..d336e9f3b7 100644--- a/react/features/recording/components/Recording/AbstractStopRecordingDialog.js+++ b/react/features/recording/components/Recording/AbstractStopRecordingDialog.js@@ -7,7 +7,6 @@ import {sendAnalytics} from '../../../analytics';import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';-import { toggleScreenshotCaptureSummary } from '../../../screenshot-capture';import { getActiveSession } from '../../functions';/**@@ -55,6 +54,7 @@ export default class AbstractStopRecordingDialog<P: Props>// Bind event handler so it is only bound once for every instance.this._onSubmit = this._onSubmit.bind(this);+ this._toggleScreenshotCapture = this._toggleScreenshotCapture.bind(this);}_onSubmit: () => boolean;@@ -72,11 +72,16 @@ export default class AbstractStopRecordingDialog<P: Props>if (_fileRecordingSession) {this.props._conference.stopRecording(_fileRecordingSession.id);- this.props.dispatch(toggleScreenshotCaptureSummary(false));+ this._toggleScreenshotCapture();}return true;}++ /**+ * To be overwritten by web component.+ */+ _toggleScreenshotCapture: () => void;}/**diff --git a/react/features/recording/components/Recording/web/StartRecordingDialog.js b/react/features/recording/components/Recording/web/StartRecordingDialog.jsindex a1e65d504f..7d26ce1909 100644--- a/react/features/recording/components/Recording/web/StartRecordingDialog.js+++ b/react/features/recording/components/Recording/web/StartRecordingDialog.js@@ -5,8 +5,10 @@ import React from 'react';import { Dialog } from '../../../../base/dialog';import { translate } from '../../../../base/i18n';import { connect } from '../../../../base/redux';+import { isScreenVideoShared } from '../../../../screen-share';+import { toggleScreenshotCaptureSummary } from '../../../../screenshot-capture';import AbstractStartRecordingDialog, {- mapStateToProps+ mapStateToProps as abstractMapStateToProps} from '../AbstractStartRecordingDialog';import StartRecordingDialogContent from '../StartRecordingDialogContent';@@ -64,10 +66,37 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {);}+ /**+ * Toggles screenshot capture feature.+ *+ * @returns {void}+ */+ _toggleScreenshotCapture() {+ const { dispatch, _screensharing, _screenshotCaptureEnabled } = this.props;++ if (_screenshotCaptureEnabled && _screensharing) {+ dispatch(toggleScreenshotCaptureSummary(true));+ }+ }+_areIntegrationsEnabled: () => boolean;_onSubmit: () => boolean;_onSelectedRecordingServiceChanged: (string) => void;_onSharingSettingChanged: () => void;}+/**+ * Maps redux state to component props.+ *+ * @param {Object} state - Redux state.+ * @returns {Object}+ */+function mapStateToProps(state) {+ return {+ ...abstractMapStateToProps(state),+ _screensharing: isScreenVideoShared(state),+ _screenshotCaptureEnabled: state['features/base/config'].enableScreenshotCapture+ };+}+export default translate(connect(mapStateToProps)(StartRecordingDialog));diff --git a/react/features/recording/components/Recording/web/StopRecordingDialog.js b/react/features/recording/components/Recording/web/StopRecordingDialog.jsindex 67ffa7dd0e..21db4f22a3 100644--- a/react/features/recording/components/Recording/web/StopRecordingDialog.js+++ b/react/features/recording/components/Recording/web/StopRecordingDialog.js@@ -5,6 +5,7 @@ import React from 'react';import { Dialog } from '../../../../base/dialog';import { translate } from '../../../../base/i18n';import { connect } from '../../../../base/redux';+import { toggleScreenshotCaptureSummary } from '../../../../screenshot-capture';import AbstractStopRecordingDialog, {type Props,_mapStateToProps@@ -38,6 +39,15 @@ class StopRecordingDialog extends AbstractStopRecordingDialog<Props> {}_onSubmit: () => boolean;++ /**+ * Toggles screenshot capture.+ *+ * @returns {void}+ */+ _toggleScreenshotCapture() {+ this.props.dispatch(toggleScreenshotCaptureSummary(false));+ }}export default translate(connect(_mapStateToProps)(StopRecordingDialog));