Persist jitsi only after meeting is joined (#20638)

* persist jitsi only after meeting is joined

Signed-off-by: Kerry Archibald <kerrya@element.io>

* lint + comment
pull/20667/head
Kerry 2022-01-20 09:51:14 +01:00 committed by GitHub
parent 840867bc02
commit 85012b287f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 6 deletions

View File

@ -218,12 +218,6 @@ function joinConference() { // event handler bound in HTML
switchVisibleContainers(); switchVisibleContainers();
if (widgetApi) {
// ignored promise because we don't care if it works
// noinspection JSIgnoredPromiseFromCall
widgetApi.setAlwaysOnScreen(true);
}
logger.warn( logger.warn(
"[Jitsi Widget] The next few errors about failing to parse URL parameters are fine if " + "[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 " + "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 (userId) meetApi.executeCommand("email", userId);
if (roomName) meetApi.executeCommand("subject", roomName); 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", () => { meetApi.on("readyToClose", () => {
switchVisibleContainers(); switchVisibleContainers();