From 04460c3b8e08678d1fcbadd673fec47fcfeb4f5e Mon Sep 17 00:00:00 2001 From: dank074 Date: Tue, 8 Nov 2022 19:06:13 -0600 Subject: [PATCH] dont queue jukebox sounds when autoplay blocked --- src/nitro/sound/music/MusicPlayer.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nitro/sound/music/MusicPlayer.ts b/src/nitro/sound/music/MusicPlayer.ts index 1a1b6a80..0e829249 100644 --- a/src/nitro/sound/music/MusicPlayer.ts +++ b/src/nitro/sound/music/MusicPlayer.ts @@ -194,6 +194,13 @@ export class MusicPlayer { if(!this._currentSong || !this._sequence) return; + //@ts-ignore + if(!Howler._audioUnlocked) + { + //console.log('skipping due to locked audio'); + return; + } + for(const sequencyEntry of this._sequence) { const entry = sequencyEntry[pos];