From 39b433eef5ca8933ed3f0f976e26c3d0d03d5cf3 Mon Sep 17 00:00:00 2001 From: TabascoEye Date: Sat, 23 Jan 2021 01:16:13 +0100 Subject: [PATCH] Update GameScene.ts stop all the map specific stuff (Jitsi, coWebsite, Audio) when leaving the scene Fixes #633 --- front/src/Phaser/Game/GameScene.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index c2cb0950..55f89321 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -698,6 +698,10 @@ export class GameScene extends ResizableScene implements CenterListener { } public cleanupClosingScene(): void { + // stop playing audio, close any open website, stop any open Jitsi + coWebsiteManager.closeCoWebsite(); + this.stopJitsi(); + this.playAudio(undefined); // We are completely destroying the current scene to avoid using a half-backed instance when coming back to the same map. if(this.connection) { this.connection.closeConnection();