From 4fcdad1551009bbd144715efb148c818ca5ba970 Mon Sep 17 00:00:00 2001 From: znerol Date: Mon, 15 Feb 2021 10:36:56 +0100 Subject: [PATCH] Fix jitsi URLs growing indefinitely in length --- front/src/WebRtc/JitsiFactory.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/front/src/WebRtc/JitsiFactory.ts b/front/src/WebRtc/JitsiFactory.ts index 7d470754..a7614817 100644 --- a/front/src/WebRtc/JitsiFactory.ts +++ b/front/src/WebRtc/JitsiFactory.ts @@ -59,6 +59,14 @@ class JitsiFactory { public start(roomName: string, playerName:string, jwt?: string, config?: object, interfaceConfig?: object): void { coWebsiteManager.insertCoWebsite((cowebsiteDiv => { + // Jitsi meet external API maintains some data in local storage + // which is sent via the appData URL parameter when joining a + // conference. Problem is that this data grows indefinitely. Thus + // after some time the URLs get so huge that loading the iframe + // becomes slow and eventually breaks completely. Thus lets just + // clear jitsi local storage before starting a new conference. + window.localStorage.removeItem("jitsiLocalStorage"); + const domain = JITSI_URL; const options: any = { // eslint-disable-line @typescript-eslint/no-explicit-any roomName: roomName,