mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-01-31 23:39:39 +00:00
Fix:Switching to next track pausing player #685
This commit is contained in:
parent
3d821dacb7
commit
6f80591afd
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue