Merge branch 'toger5/connectionLostBanner' into connectionlostbanner_lk

NB. I had to more or less rewrite this as it had been refactored in the livekit branch.
This commit is contained in:
David Baker
2023-07-21 20:03:37 +01:00
7 changed files with 137 additions and 6 deletions

View File

@@ -45,6 +45,12 @@ class DependencyLoadStates {
export class Initializer {
private static internalInstance: Initializer;
private isInitialized = false;
public static isInitialized(): boolean {
return Initializer.internalInstance?.isInitialized;
}
public static initBeforeReact() {
// this maybe also needs to return a promise in the future,
// if we have to do async inits before showing the loading screen
@@ -227,6 +233,7 @@ export class Initializer {
if (this.loadStates.allDepsAreLoaded()) {
// resolve if there is no dependency that is not loaded
resolve();
this.isInitialized = true;
}
}