Fix Jitsi Meet getting wedged at startup in some cases (#21995)

This commit is contained in:
Robin 2022-04-30 10:23:36 -04:00 committed by GitHub
parent b5336c9a4d
commit f733e2af87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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