From 7b9c6167880261ec088b226b5b37b11865506a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 26 Apr 2022 15:06:50 +0200 Subject: [PATCH] Fixing sound stop function in scripting API The sound "stop()" method was broken in scripting API. This commit adds the missing listener in GameScene --- front/src/Phaser/Game/GameScene.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 0d13e3d2..9d1d9f2a 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -1106,6 +1106,13 @@ ${escapedMessage} }) ); + this.iframeSubscriptionList.push( + iframeListener.stopSoundStream.subscribe((stopSoundEvent) => { + const url = new URL(stopSoundEvent.url, this.MapUrlFile); + soundManager.stopSound(this.sound, url.toString()); + }) + ); + this.iframeSubscriptionList.push( iframeListener.addActionsMenuKeyToRemotePlayerStream.subscribe((data) => { this.MapPlayersByKey.get(data.id)?.registerActionsMenuAction({