Skip to content

Commit

Permalink
Fix Jitsi Meet getting wedged at startup in some cases (#21995)
Browse files Browse the repository at this point in the history
  • Loading branch information
robintown authored Apr 30, 2022
1 parent b5336c9 commit f733e2a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/vector/jitsi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,18 @@ function joinConference(audioDevice?: string, videoDevice?: string) {
audioInput: audioDevice,
videoInput: videoDevice,
},
userInfo: {
displayName,
email: userId,
},
interfaceConfigOverwrite: {
SHOW_JITSI_WATERMARK: false,
SHOW_WATERMARK_FOR_GUESTS: false,
MAIN_TOOLBAR_BUTTONS: [],
VIDEO_LAYOUT_FIT: "height",
},
configOverwrite: {
subject: roomName,
startAudioOnly,
startWithAudioMuted: !audioDevice,
startWithVideoMuted: !videoDevice,
Expand All @@ -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
Expand Down

0 comments on commit f733e2a

Please sign in to comment.