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(pip): do not clear an unsupported MediaSession action on cleanup

damenchob618c8e45d58
diff --git a/react/features/pip/hooks.ts b/react/features/pip/hooks.ts
index a44e941b34..5173b96d8b 100644
--- a/react/features/pip/hooks.ts
+++ b/react/features/pip/hooks.ts
@@ -286,6 +286,10 @@ export function useDocumentPiPMediaSession() {
});
} catch (error) {
logger.warn('enterpictureinpicture MediaSession action not supported:', error);
+
+ // Clearing the handler would throw the same error (e.g. Firefox) from the effect
+ // cleanup and crash the app, so there is nothing to undo.
+ return;
}
return () => {