mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-16 08:21:29 +00:00
Fix Smart Speed playback time contract
This commit is contained in:
parent
5c747a7f8f
commit
97c5d6341e
9 changed files with 205 additions and 17 deletions
|
|
@ -189,7 +189,7 @@ export default {
|
|||
this.$refs.hoverTimestampArrow.style.left = posLeft + 'px'
|
||||
}
|
||||
if (this.$refs.hoverTimestampText) {
|
||||
var hoverText = this.$secondsToTimestamp(progressTime / this._playbackRate)
|
||||
var hoverText = this.$secondsToTimestamp(progressTime)
|
||||
|
||||
var chapter = this.chapters.find((chapter) => chapter.start <= totalTime && totalTime < chapter.end)
|
||||
if (chapter && chapter.title) {
|
||||
|
|
|
|||
|
|
@ -132,9 +132,9 @@ export default {
|
|||
timeRemaining() {
|
||||
if (this.useChapterTrack && this.currentChapter) {
|
||||
var currChapTime = this.currentTime - this.currentChapter.start
|
||||
return (this.currentChapterDuration - currChapTime) / this.playbackRate
|
||||
return this.currentChapterDuration - currChapTime
|
||||
}
|
||||
return (this.duration - this.currentTime) / this.playbackRate
|
||||
return this.duration - this.currentTime
|
||||
},
|
||||
timeRemainingPretty() {
|
||||
if (this.timeRemaining < 0) {
|
||||
|
|
@ -309,7 +309,7 @@ export default {
|
|||
return
|
||||
}
|
||||
const time = this.useChapterTrack ? Math.max(0, this.currentTime - this.currentChapterStart) : this.currentTime
|
||||
ts.innerText = this.$secondsToTimestamp(time / this.playbackRate)
|
||||
ts.innerText = this.$secondsToTimestamp(time)
|
||||
},
|
||||
setBufferTime(bufferTime) {
|
||||
if (this.$refs.trackbar) this.$refs.trackbar.setBufferTime(bufferTime)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue