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: Make sure we deliver videoConferenceLeft.

damenchoa15019527523
diff --git a/react/features/app/actions.web.ts b/react/features/app/actions.web.ts
index 2741756954..9c88eae7fb 100644
--- a/react/features/app/actions.web.ts
+++ b/react/features/app/actions.web.ts
@@ -189,6 +189,15 @@ export function reloadNow() {
const reloadAction = () => {
logger.info(`Reloading the conference using URL: ${locationURL}`);
+ // Fire videoConferenceLeft before navigation so it is delivered
+ // while the postis channel is still active. postMessage sent from
+ // beforeunload is unreliable in Chrome when the iframe navigates.
+ // @ts-ignore
+ APP.API.notifyConferenceLeft(APP.conference.roomName);
+
+ // @ts-ignore
+ APP.API.dispose(); // prevent double-fire from the beforeunload handler
+
dispatch(reloadWithStoredParams());
};