Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Fixes issue with conference starting before the UI is ready + enableWelcomePage config support.
yanasbbb144f1bda8
diff --git a/app.js b/app.jsindex 6e00cf81f0..a7a2f61d77 100644--- a/app.js+++ b/app.js@@ -76,22 +76,24 @@ const APP = {};function init() {- APP.UI.start();- APP.conference.init({roomName: buildRoomName()}).then(function () {- APP.UI.initConference();+ var isUIReady = APP.UI.start();+ if (isUIReady) {+ APP.conference.init({roomName: buildRoomName()}).then(function () {+ APP.UI.initConference();++ APP.UI.addListener(UIEvents.LANG_CHANGED, function (language) {+ APP.translation.setLanguage(language);+ APP.settings.setLanguage(language);+ });- APP.UI.addListener(UIEvents.LANG_CHANGED, function (language) {- APP.translation.setLanguage(language);- APP.settings.setLanguage(language);+ APP.desktopsharing.init(JitsiMeetJS.isDesktopSharingEnabled());+ APP.statistics.start();+ APP.connectionquality.init();+ APP.keyboardshortcut.init();+ }).catch(function (err) {+ console.error(err);});-- APP.desktopsharing.init(JitsiMeetJS.isDesktopSharingEnabled());- APP.statistics.start();- APP.connectionquality.init();- APP.keyboardshortcut.init();- }).catch(function (err) {- console.error(err);- });+ }}/**diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex 731293bd30..a12fa709ab 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -223,6 +223,12 @@ function bindEvents() {$(window).resize(onResize);}+/**+ * Starts the UI module and initializes all related components.+ *+ * @returns {boolean} true if the UI is ready and the conference should be+ * esablished, false - otherwise (for example in the case of welcome page)+ */UI.start = function () {document.title = interfaceConfig.APP_NAME;var setupWelcomePage = null;@@ -234,7 +240,9 @@ UI.start = function () {setupWelcomePage = require("./welcome_page/WelcomePage");setupWelcomePage();- return;+ // Return false to indicate that the UI hasn't been fully started and+ // conference ready. We're still waiting for input from the user.+ return false;}$("#welcome_page").hide();@@ -318,6 +326,9 @@ UI.start = function () {SettingsMenu.init(eventEmitter);}+ // Return true to indicate that the UI has been fully started and+ // conference ready.+ return true;};