mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-23 04:09:38 +00:00
New model update audio player, stream, collections
This commit is contained in:
parent
2d19208340
commit
65df377a49
20 changed files with 145 additions and 145 deletions
|
|
@ -8,7 +8,7 @@ export default class LocalPlayer extends EventEmitter {
|
|||
this.ctx = ctx
|
||||
this.player = null
|
||||
|
||||
this.audiobook = null
|
||||
this.libraryItem = null
|
||||
this.audioTracks = []
|
||||
this.currentTrackIndex = 0
|
||||
this.hlsStreamId = null
|
||||
|
|
@ -110,8 +110,8 @@ export default class LocalPlayer extends EventEmitter {
|
|||
}
|
||||
}
|
||||
|
||||
set(audiobook, tracks, hlsStreamId, startTime, playWhenReady = false) {
|
||||
this.audiobook = audiobook
|
||||
set(libraryItem, tracks, hlsStreamId, startTime, playWhenReady = false) {
|
||||
this.libraryItem = libraryItem
|
||||
this.audioTracks = tracks
|
||||
this.hlsStreamId = hlsStreamId
|
||||
this.playWhenReady = playWhenReady
|
||||
|
|
@ -198,7 +198,7 @@ export default class LocalPlayer extends EventEmitter {
|
|||
async resetStream(startTime) {
|
||||
this.destroyHlsInstance()
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000))
|
||||
this.set(this.audiobook, this.audioTracks, this.hlsStreamId, startTime, true)
|
||||
this.set(this.libraryItem, this.audioTracks, this.hlsStreamId, startTime, true)
|
||||
}
|
||||
|
||||
playPause() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue