Move all game scene game map properties listeners
This commit is contained in:
parent
666b6df588
commit
460d67534a
7 changed files with 149 additions and 189 deletions
|
@ -1,22 +1,11 @@
|
|||
import CancelablePromise from "cancelable-promise";
|
||||
import { gameManager } from "../../Phaser/Game/GameManager";
|
||||
import { coWebsiteManager } from "../CoWebsiteManager";
|
||||
import { jitsiFactory } from "../JitsiFactory";
|
||||
import { SimpleCoWebsite } from "./SimpleCoWebsite";
|
||||
|
||||
export class JitsiCoWebsite extends SimpleCoWebsite {
|
||||
private jitsiLoadPromise?: () => CancelablePromise<HTMLIFrameElement>;
|
||||
|
||||
constructor(url: URL, allowApi?: boolean, allowPolicy?: string, widthPercent?: number, closable?: boolean) {
|
||||
const coWebsite = coWebsiteManager.searchJitsi();
|
||||
|
||||
if (coWebsite) {
|
||||
coWebsiteManager.closeCoWebsite(coWebsite);
|
||||
}
|
||||
|
||||
super(url, allowApi, allowPolicy, widthPercent, closable);
|
||||
}
|
||||
|
||||
setJitsiLoadPromise(promise: () => CancelablePromise<HTMLIFrameElement>): void {
|
||||
this.jitsiLoadPromise = promise;
|
||||
}
|
||||
|
@ -26,7 +15,6 @@ export class JitsiCoWebsite extends SimpleCoWebsite {
|
|||
this.state.set("loading");
|
||||
|
||||
gameManager.getCurrentGameScene().disableMediaBehaviors();
|
||||
jitsiFactory.restart();
|
||||
|
||||
if (!this.jitsiLoadPromise) {
|
||||
return reject("Undefined Jitsi start callback");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue