From bcb0fe919c3c679082af22065fc00694f6502d2f Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Tue, 9 Nov 2021 12:58:49 -0600 Subject: [PATCH] fix(recorder): "already started" notification --- lang/main.json | 2 ++ react/features/recording/actions.any.js | 13 ++++++++++++- react/features/recording/middleware.js | 8 +++++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lang/main.json b/lang/main.json index c2e72859d..9cdf33dc1 100644 --- a/lang/main.json +++ b/lang/main.json @@ -501,6 +501,7 @@ "expandedPending": "The live streaming is being started...", "failedToStart": "Live Streaming failed to start", "getStreamKeyManually": "We weren’t able to fetch any live streams. Try getting your live stream key from YouTube.", + "inProgress": "Recording or live streaming in progress", "invalidStreamKey": "Live stream key may be incorrect.", "off": "Live Streaming stopped", "offBy": "{{name}} stopped the live streaming", @@ -761,6 +762,7 @@ "expandedPending": "Recording is being started...", "failedToStart": "Recording failed to start", "fileSharingdescription": "Share recording with meeting participants", + "inProgress": "Recording or live streaming in progress", "linkGenerated": "We have generated a link to your recording.", "live": "LIVE", "loggedIn": "Logged in as {{userName}}", diff --git a/react/features/recording/actions.any.js b/react/features/recording/actions.any.js index 5c9551fdc..2bc433db6 100644 --- a/react/features/recording/actions.any.js +++ b/react/features/recording/actions.any.js @@ -9,7 +9,8 @@ import { NOTIFICATION_TIMEOUT, hideNotification, showErrorNotification, - showNotification + showNotification, + showWarningNotification } from '../notifications'; import { @@ -115,6 +116,16 @@ export function showRecordingError(props: Object) { return showErrorNotification(props); } +/** + * Signals that the recording warning notification should be shown. + * + * @param {Object} props - The Props needed to render the notification. + * @returns {showWarningNotification} + */ +export function showRecordingWarning(props: Object) { + return showWarningNotification(props); +} + /** * Signals that the stopped recording notification should be shown on the * screen for a given period. diff --git a/react/features/recording/middleware.js b/react/features/recording/middleware.js index 3149425b0..be49daae9 100644 --- a/react/features/recording/middleware.js +++ b/react/features/recording/middleware.js @@ -27,6 +27,7 @@ import { showPendingRecordingNotification, showRecordingError, showRecordingLimitNotification, + showRecordingWarning, showStartedRecordingNotification, showStoppedRecordingNotification, updateRecordingSessionData @@ -262,10 +263,11 @@ function _showRecordingErrorNotification(recorderSession, dispatch) { })); break; case JitsiMeetJS.constants.recording.error.UNEXPECTED_REQUEST: - dispatch(showRecordingError({ - titleKey: isStreamMode + dispatch(showRecordingWarning({ + descriptionKey: isStreamMode ? 'liveStreaming.sessionAlreadyActive' - : 'recording.sessionAlreadyActive' + : 'recording.sessionAlreadyActive', + titleKey: isStreamMode ? 'liveStreaming.inProgress' : 'recording.inProgress' })); break; default: