From eab8a19ec7e897e0834edf29ad15281798d6bda3 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 5 Apr 2022 11:32:26 -0400 Subject: [PATCH] Avoid flashing the Jitsi prejoin screen at the user before skipping it (#21665) --- src/vector/jitsi/index.scss | 4 ++++ src/vector/jitsi/index.ts | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vector/jitsi/index.scss b/src/vector/jitsi/index.scss index 95a23c1772..ac6aff1652 100644 --- a/src/vector/jitsi/index.scss +++ b/src/vector/jitsi/index.scss @@ -56,6 +56,10 @@ body, html { position: absolute; height: 100%; width: 100%; + + // Hidden by default to avoid flashing the prejoin screen at the user when + // we're supposed to skip it anyways + visibility: hidden; } .joinConferenceFloating { diff --git a/src/vector/jitsi/index.ts b/src/vector/jitsi/index.ts index 346c9dab0c..055d4aff4f 100644 --- a/src/vector/jitsi/index.ts +++ b/src/vector/jitsi/index.ts @@ -129,11 +129,9 @@ const ack = (ev: CustomEvent) => widgetApi.transport.reply(ev skipOurWelcomeScreen = (new SnakedObject(jitsiConfig)) .get("skip_built_in_welcome_screen") || isVideoChannel; - // If we're meant to skip our screen, skip to the part where we show Jitsi instead of us. + // Either reveal the prejoin screen, or skip straight to Jitsi depending on the config. // We don't set up the call yet though as this might lead to failure without the widget API. - if (skipOurWelcomeScreen) { - toggleConferenceVisibility(true); - } + toggleConferenceVisibility(skipOurWelcomeScreen); if (widgetApi) { await readyPromise;