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) Notify external api about local recording (#11887)
Robert Pintiliicb712eb4aba3
diff --git a/modules/API/API.js b/modules/API/API.jsindex b50cfb4488..f9f7716182 100644--- a/modules/API/API.js+++ b/modules/API/API.js@@ -1599,7 +1599,7 @@ class API {* Notify external application (if API is enabled) that recording has started or stopped.** @param {boolean} on - True if recording is on, false otherwise.- * @param {string} mode - Stream or file.+ * @param {string} mode - Stream or file or local.* @param {string} error - Error type or null if success.* @returns {void}*/diff --git a/react/features/recording/middleware.js b/react/features/recording/middleware.jsindex fdcc46c949..a5d690d827 100644--- a/react/features/recording/middleware.js+++ b/react/features/recording/middleware.js@@ -153,6 +153,9 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>}, NOTIFICATION_TIMEOUT_TYPE.STICKY));dispatch(updateLocalRecordingStatus(true, onlySelf));sendAnalytics(createRecordingEvent('started', `local${onlySelf ? '.self' : ''}`));+ if (typeof APP !== 'undefined') {+ APP.API.notifyRecordingStatusChanged(true, 'local');+ }} catch (err) {logger.error('Capture failed', err);@@ -169,6 +172,10 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>titleKey: 'recording.failedToStart'};+ if (typeof APP !== 'undefined') {+ APP.API.notifyRecordingStatusChanged(false, 'local', err.message);+ }+dispatch(showErrorNotification(props, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));}break;@@ -183,6 +190,9 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>if (localRecording?.notifyAllParticipants && !LocalRecordingManager.selfRecording) {dispatch(playSound(RECORDING_OFF_SOUND_ID));}+ if (typeof APP !== 'undefined') {+ APP.API.notifyRecordingStatusChanged(false, 'local');+ }}break;}