From 6f80591afdcbacd644aafab3e5e84b1674c28ca9 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 5 Jun 2022 10:06:07 -0500 Subject: [PATCH] Fix:Switching to next track pausing player #685 --- client/players/LocalAudioPlayer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/players/LocalAudioPlayer.js b/client/players/LocalAudioPlayer.js index e88a3fef..12c4d42f 100644 --- a/client/players/LocalAudioPlayer.js +++ b/client/players/LocalAudioPlayer.js @@ -71,7 +71,6 @@ export default class LocalAudioPlayer extends EventEmitter { console.log(`[LocalPlayer] Track ended - loading next track ${this.currentTrackIndex + 1}`) // Has next track this.currentTrackIndex++ - this.playWhenReady = !this.player.paused this.startTime = this.currentTrack.startOffset this.loadCurrentTrack() } else { @@ -206,10 +205,12 @@ export default class LocalAudioPlayer extends EventEmitter { } play() { + this.playWhenReady = true if (this.player) this.player.play() } pause() { + this.playWhenReady = false if (this.player) this.player.pause() }