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(local-recording) Improvements (#11754)
Robert Pintilii730d42cba167
diff --git a/lang/main.json b/lang/main.jsonindex 7ca77d6ca0..7b80c7248b 100644--- a/lang/main.json+++ b/lang/main.json@@ -896,6 +896,8 @@"live": "LIVE","localRecordingNoNotificationWarning": "The recording will not be announced to other participants. You will need to let them know that the meeting is recorded.","localRecordingNoVideo": "Video is not being recorded",+ "localRecordingStartWarning": "Please make sure you stop the recording before exiting the meeting in order to save it.",+ "localRecordingStartWarningTitle": "Stop the recording to save it","localRecordingVideoStop": "Stopping your video will also stop the local recording. Are you sure you want to continue?","localRecordingVideoWarning": "To record your video you must have it on when starting the recording","localRecordingWarning": "Make sure you select the current tab in order to use the right video and audio. The recording is currently limited to 1GB, which is around 100 minutes.",diff --git a/react/features/recording/components/Recording/AbstractStartRecordingDialog.js b/react/features/recording/components/Recording/AbstractStartRecordingDialog.jsindex 58e62d071b..8006e9d32c 100644--- a/react/features/recording/components/Recording/AbstractStartRecordingDialog.js+++ b/react/features/recording/components/Recording/AbstractStartRecordingDialog.js@@ -405,6 +405,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {export function mapStateToProps(state: Object) {const {transcription,+ fileRecordingsEnabled = false,fileRecordingsServiceEnabled = false,fileRecordingsServiceSharingEnabled = false,dropbox = {}@@ -414,6 +415,7 @@ export function mapStateToProps(state: Object) {_appKey: dropbox.appKey,_autoCaptionOnRecord: transcription?.autoCaptionOnRecord ?? false,_conference: state['features/base/conference'].conference,+ _fileRecordingsEnabled: fileRecordingsEnabled,_fileRecordingsServiceEnabled: fileRecordingsServiceEnabled,_fileRecordingsServiceSharingEnabled: fileRecordingsServiceSharingEnabled,_isDropboxEnabled: isDropboxEnabled(state),diff --git a/react/features/recording/components/Recording/StartRecordingDialogContent.js b/react/features/recording/components/Recording/StartRecordingDialogContent.jsindex 71cb542e25..929f676a17 100644--- a/react/features/recording/components/Recording/StartRecordingDialogContent.js+++ b/react/features/recording/components/Recording/StartRecordingDialogContent.js@@ -64,6 +64,11 @@ type Props = {*/dispatch: Function,+ /**+ * Whether the file recording is enabled.+ */+ fileRecordingsEnabled: boolean,+/*** Whether to show file recordings service, even if integrations* are enabled.@@ -211,9 +216,14 @@ class StartRecordingDialogContent extends Component<Props> {* @returns {boolean}*/_shouldRenderFileSharingContent() {- const { fileRecordingsServiceSharingEnabled, isVpaas, selectedRecordingService } = this.props;+ const {+ fileRecordingsServiceSharingEnabled,+ isVpaas,+ selectedRecordingService,+ fileRecordingsEnabled+ } = this.props;- if (!fileRecordingsServiceSharingEnabled+ if (!(fileRecordingsServiceSharingEnabled && fileRecordingsEnabled)|| isVpaas|| selectedRecordingService !== RECORDING_TYPES.JITSI_REC_SERVICE) {return false;@@ -319,6 +329,9 @@ class StartRecordingDialogContent extends Component<Props> {_shouldRenderNoIntegrationsContent() {// show the non integrations part only if fileRecordingsServiceEnabled// is enabled or when there are no integrations enabled+ if (!this.props.fileRecordingsEnabled) {+ return false;+ }if (!(this.props.fileRecordingsServiceEnabled|| !this.props.integrationsEnabled)) {return false;@@ -441,7 +454,7 @@ class StartRecordingDialogContent extends Component<Props> {);}- if (this.props.fileRecordingsServiceEnabled) {+ if (this.props.fileRecordingsServiceEnabled && this.props.fileRecordingsEnabled) {switchContent = (<SwitchclassName = 'recording-switch'diff --git a/react/features/recording/components/Recording/web/StartRecordingDialog.js b/react/features/recording/components/Recording/web/StartRecordingDialog.jsindex 2f91354871..5f990ccd68 100644--- a/react/features/recording/components/Recording/web/StartRecordingDialog.js+++ b/react/features/recording/components/Recording/web/StartRecordingDialog.js@@ -62,6 +62,7 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {userName} = this.state;const {+ _fileRecordingsEnabled,_fileRecordingsServiceEnabled,_fileRecordingsServiceSharingEnabled} = this.props;@@ -74,6 +75,7 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {titleKey = 'dialog.startRecording'width = 'small'><StartRecordingDialogContent+ fileRecordingsEnabled = { _fileRecordingsEnabled }fileRecordingsServiceEnabled = { _fileRecordingsServiceEnabled }fileRecordingsServiceSharingEnabled = { _fileRecordingsServiceSharingEnabled }integrationsEnabled = { this._areIntegrationsEnabled() }diff --git a/react/features/recording/functions.js b/react/features/recording/functions.jsindex 26a3b482f7..423ebb2889 100644--- a/react/features/recording/functions.js+++ b/react/features/recording/functions.js@@ -151,11 +151,17 @@ export function getRecordButtonProps(state: Object): ?string {const isModerator = isLocalParticipantModerator(state);const {enableFeaturesBasedOnToken,- fileRecordingsEnabled+ fileRecordingsEnabled,+ localRecording} = state['features/base/config'];const { features = {} } = getLocalParticipant(state);+ let localRecordingEnabled = !localRecording?.disable;- visible = isModerator && fileRecordingsEnabled;+ if (navigator.product === 'ReactNative') {+ localRecordingEnabled = false;+ }++ visible = isModerator && (fileRecordingsEnabled || localRecordingEnabled);if (enableFeaturesBasedOnToken) {visible = visible && String(features.recording) === 'true';diff --git a/react/features/recording/middleware.js b/react/features/recording/middleware.jsindex 06fe808cc6..21d9237278 100644--- a/react/features/recording/middleware.js+++ b/react/features/recording/middleware.js@@ -147,6 +147,10 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>dispatch(playSound(RECORDING_ON_SOUND_ID));}dispatch(showNotification(props, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));+ dispatch(showNotification({+ titleKey: 'recording.localRecordingStartWarningTitle',+ descriptionKey: 'recording.localRecordingStartWarning'+ }, NOTIFICATION_TIMEOUT_TYPE.STICKY));dispatch(updateLocalRecordingStatus(true, onlySelf));sendAnalytics(createRecordingEvent('started', `local${onlySelf ? '.self' : ''}`));} catch (err) {