diff --git a/src/vector/jitsi/index.ts b/src/vector/jitsi/index.ts index f5993ff1b19..4f0dab067fa 100644 --- a/src/vector/jitsi/index.ts +++ b/src/vector/jitsi/index.ts @@ -218,12 +218,6 @@ function joinConference() { // event handler bound in HTML switchVisibleContainers(); - if (widgetApi) { - // ignored promise because we don't care if it works - // noinspection JSIgnoredPromiseFromCall - widgetApi.setAlwaysOnScreen(true); - } - logger.warn( "[Jitsi Widget] The next few errors about failing to parse URL parameters are fine if " + "they mention 'external_api' or 'jitsi' in the stack. They're just Jitsi Meet trying to parse " + @@ -252,6 +246,16 @@ function joinConference() { // event handler bound in HTML if (userId) meetApi.executeCommand("email", userId); if (roomName) meetApi.executeCommand("subject", roomName); + // fires once when user joins the conference + // (regardless of video on or off) + meetApi.on("videoConferenceJoined", () => { + if (widgetApi) { + // ignored promise because we don't care if it works + // noinspection JSIgnoredPromiseFromCall + widgetApi.setAlwaysOnScreen(true); + } + }); + meetApi.on("readyToClose", () => { switchVisibleContainers();