Skip to content

Commit

Permalink
Persist jitsi only after meeting is joined (#20638)
Browse files Browse the repository at this point in the history
* persist jitsi only after meeting is joined

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

* lint + comment
Kerry authored Jan 20, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 840867b commit 85012b2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/vector/jitsi/index.ts
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 85012b2

Please sign in to comment.