diff --git a/modules/API/API.js b/modules/API/API.js index b50cfb448..f9f771618 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.js index fdcc46c94..a5d690d82 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; }