Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(recording): play the off sound when a local recording stops

damencho8ccd99579f5c
diff --git a/react/features/recording/middleware.ts b/react/features/recording/middleware.ts
index 8dbbc2d3ea..edf375bac1 100644
--- a/react/features/recording/middleware.ts
+++ b/react/features/recording/middleware.ts
@@ -473,10 +473,13 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
const { localRecording } = getState()['features/base/config'];
if (LocalRecordingManager.isRecordingLocally()) {
+ // Capture before stopping — the recorder's stop handler resets the flag.
+ const wasSelfRecording = LocalRecordingManager.selfRecording.on;
+
LocalRecordingManager.stopLocalRecording();
dispatch(setLocalRecordingRunning(false));
dispatch(updateLocalRecordingStatus(false));
- if (localRecording?.notifyAllParticipants && !LocalRecordingManager.selfRecording) {
+ if (localRecording?.notifyAllParticipants && !wasSelfRecording) {
dispatch(playSound(RECORDING_OFF_SOUND_ID));
}
if (typeof APP !== 'undefined') {