mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-20 04:49:27 +01:00
Fix:Switching to next track pausing player #685
This commit is contained in:
parent
3d821dacb7
commit
6f80591afd
@ -71,7 +71,6 @@ export default class LocalAudioPlayer extends EventEmitter {
|
|||||||
console.log(`[LocalPlayer] Track ended - loading next track ${this.currentTrackIndex + 1}`)
|
console.log(`[LocalPlayer] Track ended - loading next track ${this.currentTrackIndex + 1}`)
|
||||||
// Has next track
|
// Has next track
|
||||||
this.currentTrackIndex++
|
this.currentTrackIndex++
|
||||||
this.playWhenReady = !this.player.paused
|
|
||||||
this.startTime = this.currentTrack.startOffset
|
this.startTime = this.currentTrack.startOffset
|
||||||
this.loadCurrentTrack()
|
this.loadCurrentTrack()
|
||||||
} else {
|
} else {
|
||||||
@ -206,10 +205,12 @@ export default class LocalAudioPlayer extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
play() {
|
play() {
|
||||||
|
this.playWhenReady = true
|
||||||
if (this.player) this.player.play()
|
if (this.player) this.player.play()
|
||||||
}
|
}
|
||||||
|
|
||||||
pause() {
|
pause() {
|
||||||
|
this.playWhenReady = false
|
||||||
if (this.player) this.player.pause()
|
if (this.player) this.player.pause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user