From 89d8180cfe9bf9aa1f03287de5cdbeb59e9a3794 Mon Sep 17 00:00:00 2001 From: _Bastler <_Bastler@bstly.de> Date: Fri, 22 Oct 2021 09:40:16 +0200 Subject: [PATCH] keep jitis circle --- front/src/Phaser/Game/GameScene.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 33407514..92351cc7 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -633,7 +633,7 @@ export class GameScene extends DirtyScene { } }); - Promise.all([this.connectionAnswerPromise as Promise, ...scriptPromises]).then(() => { + Promise.all([ this.connectionAnswerPromise as Promise, ...scriptPromises ]).then(() => { this.scene.wake(); }); } @@ -1843,8 +1843,16 @@ export class GameScene extends DirtyScene { const jitsiWidth = allProps.get("jitsiWidth") as number | undefined; jitsiFactory.start(roomName, this.playerName, jwt, jitsiConfig, jitsiInterfaceConfig, jitsiUrl, jitsiWidth); - this.connection?.setSilent(true); - mediaManager.hideGameOverlay(); + + const jitsiKeepCircle = allProps.get("jitsiKeepCircle") as boolean | false; + + if (!jitsiKeepCircle) { + this.connection?.setSilent(true); + mediaManager.hideGameOverlay(); + } else { + const silent = this.gameMap.getCurrentProperties().get("silent"); + this.connection?.setSilent(!!silent); + } analyticsClient.enteredJitsi(roomName, this.room.id); //permit to stop jitsi when user close iframe