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
This commit is contained in:
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

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();