From 1bed4b46fff8db96d637170b43280be6ec309d14 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Fri, 29 Apr 2022 08:44:19 -0400 Subject: [PATCH] Fix Jitsi Meet getting wedged at startup in some cases --- src/vector/jitsi/index.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vector/jitsi/index.ts b/src/vector/jitsi/index.ts index 8a89e5799ca..21744921236 100644 --- a/src/vector/jitsi/index.ts +++ b/src/vector/jitsi/index.ts @@ -331,6 +331,10 @@ function joinConference(audioDevice?: string, videoDevice?: string) { audioInput: audioDevice, videoInput: videoDevice, }, + userInfo: { + displayName, + email: userId, + }, interfaceConfigOverwrite: { SHOW_JITSI_WATERMARK: false, SHOW_WATERMARK_FOR_GUESTS: false, @@ -338,6 +342,7 @@ function joinConference(audioDevice?: string, videoDevice?: string) { VIDEO_LAYOUT_FIT: "height", }, configOverwrite: { + subject: roomName, startAudioOnly, startWithAudioMuted: !audioDevice, startWithVideoMuted: !videoDevice, @@ -359,14 +364,12 @@ function joinConference(audioDevice?: string, videoDevice?: string) { } meetApi = new JitsiMeetExternalAPI(jitsiDomain, options); - if (displayName) meetApi.executeCommand("displayName", displayName); - if (avatarUrl) meetApi.executeCommand("avatarUrl", avatarUrl); - 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 (avatarUrl) meetApi.executeCommand("avatarUrl", avatarUrl); + if (widgetApi) { // ignored promise because we don't care if it works // noinspection JSIgnoredPromiseFromCall