Fixes issue with conference starting before the UI is ready + enableWelcomePage config support.
This commit is contained in:
parent
632b56b069
commit
bbb144f1bd
30
app.js
30
app.js
|
@ -76,22 +76,24 @@ const APP = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
APP.UI.start();
|
var isUIReady = APP.UI.start();
|
||||||
APP.conference.init({roomName: buildRoomName()}).then(function () {
|
if (isUIReady) {
|
||||||
APP.UI.initConference();
|
APP.conference.init({roomName: buildRoomName()}).then(function () {
|
||||||
|
APP.UI.initConference();
|
||||||
|
|
||||||
APP.UI.addListener(UIEvents.LANG_CHANGED, function (language) {
|
APP.UI.addListener(UIEvents.LANG_CHANGED, function (language) {
|
||||||
APP.translation.setLanguage(language);
|
APP.translation.setLanguage(language);
|
||||||
APP.settings.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);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -223,6 +223,12 @@ function bindEvents() {
|
||||||
$(window).resize(onResize);
|
$(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 () {
|
UI.start = function () {
|
||||||
document.title = interfaceConfig.APP_NAME;
|
document.title = interfaceConfig.APP_NAME;
|
||||||
var setupWelcomePage = null;
|
var setupWelcomePage = null;
|
||||||
|
@ -234,7 +240,9 @@ UI.start = function () {
|
||||||
setupWelcomePage = require("./welcome_page/WelcomePage");
|
setupWelcomePage = require("./welcome_page/WelcomePage");
|
||||||
setupWelcomePage();
|
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();
|
$("#welcome_page").hide();
|
||||||
|
@ -318,6 +326,9 @@ UI.start = function () {
|
||||||
SettingsMenu.init(eventEmitter);
|
SettingsMenu.init(eventEmitter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return true to indicate that the UI has been fully started and
|
||||||
|
// conference ready.
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue