mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-09 21:44:41 +02:00
Update:Syncing playback time when media item is open in player
This commit is contained in:
parent
b4bf10d409
commit
ff4f8324e7
25 changed files with 149 additions and 177 deletions
|
@ -574,8 +574,8 @@ export default {
|
|||
AbsAudioPlayer.seek({ value: Math.floor(time) })
|
||||
|
||||
if (this.$refs.playedTrack) {
|
||||
var perc = time / this.totalDuration
|
||||
var ptWidth = Math.round(perc * this.trackWidth)
|
||||
const perc = time / this.totalDuration
|
||||
const ptWidth = Math.round(perc * this.trackWidth)
|
||||
this.$refs.playedTrack.style.width = ptWidth + 'px'
|
||||
|
||||
this.$refs.playedTrack.classList.remove('bg-gray-200')
|
||||
|
@ -721,7 +721,7 @@ export default {
|
|||
AbsAudioPlayer.closePlayback()
|
||||
},
|
||||
endPlayback() {
|
||||
this.$store.commit('setPlayerItem', null)
|
||||
this.$store.commit('setPlaybackSession', null)
|
||||
this.showFullscreen = false
|
||||
this.isEnded = false
|
||||
this.isLoading = false
|
||||
|
@ -767,7 +767,7 @@ export default {
|
|||
this.isEnded = false
|
||||
this.isLoading = true
|
||||
this.syncStatus = 0
|
||||
this.$store.commit('setPlayerItem', this.playbackSession)
|
||||
this.$store.commit('setPlaybackSession', this.playbackSession)
|
||||
|
||||
// Set track width
|
||||
this.$nextTick(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue