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): On missing session id, send stop.

damencho4f3dc195cf16
diff --git a/modules/API/API.js b/modules/API/API.js
index 19dfb2276d..dc47a4166a 100755
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -843,12 +843,8 @@ function initCommands() {
const activeSession = getActiveSession(state, mode);
- if (activeSession && activeSession.id) {
- APP.store.dispatch(toggleScreenshotCaptureSummary(false));
- conference.stopRecording(activeSession.id);
- } else {
- logger.error('No recording or streaming session found');
- }
+ APP.store.dispatch(toggleScreenshotCaptureSummary(false));
+ conference.stopRecording(activeSession?.id);
},
'initiate-private-chat': participantId => {
const state = APP.store.getState();
diff --git a/react/features/mobile/external-api/middleware.ts b/react/features/mobile/external-api/middleware.ts
index c3d8052ea4..f73ea4717a 100644
--- a/react/features/mobile/external-api/middleware.ts
+++ b/react/features/mobile/external-api/middleware.ts
@@ -614,13 +614,7 @@ function _registerForNativeEvents(store: IStore) {
const activeSession = getActiveSession(state, mode);
- if (!activeSession?.id) {
- logger.error('No recording or streaming session found');
-
- return;
- }
-
- conference.stopRecording(activeSession.id);
+ conference.stopRecording(activeSession?.id);
});
eventEmitter.addListener(ExternalAPI.OVERWRITE_CONFIG, ({ config }: any) => {
diff --git a/react/features/recording/components/LiveStream/AbstractStopLiveStreamDialog.ts b/react/features/recording/components/LiveStream/AbstractStopLiveStreamDialog.ts
index c5fcc02380..3271ee7b3e 100644
--- a/react/features/recording/components/LiveStream/AbstractStopLiveStreamDialog.ts
+++ b/react/features/recording/components/LiveStream/AbstractStopLiveStreamDialog.ts
@@ -57,9 +57,7 @@ export default class AbstractStopLiveStreamDialog extends Component<IProps> {
const { _session } = this.props;
- if (_session) {
- this.props._conference?.stopRecording(_session.id);
- }
+ this.props._conference?.stopRecording(_session?.id);
return true;
}
diff --git a/react/features/recording/components/Recording/AbstractStopRecordingDialog.ts b/react/features/recording/components/Recording/AbstractStopRecordingDialog.ts
index a49a69e0d9..7817186a54 100644
--- a/react/features/recording/components/Recording/AbstractStopRecordingDialog.ts
+++ b/react/features/recording/components/Recording/AbstractStopRecordingDialog.ts
@@ -102,8 +102,8 @@ export default class AbstractStopRecordingDialog<P extends IProps>
if (localRecordingVideoStop) {
dispatch(setVideoMuted(true));
}
- } else if (_fileRecordingSession) {
- _conference?.stopRecording(_fileRecordingSession.id);
+ } else {
+ _conference?.stopRecording(_fileRecordingSession?.id);
this._toggleScreenshotCapture();
}