Fix:Buffered progress bar for chapter track #250

This commit is contained in:
advplyr 2022-07-04 18:42:43 -05:00
parent 48313b60c1
commit e07e7f70d6

View file

@ -447,7 +447,7 @@ export default {
if (this.useChapterTrack && this.currentChapter) {
var currChapTime = this.currentTime - this.currentChapter.start
percentDone = currChapTime / this.currentChapterDuration
bufferedPercent = (this.bufferedTime - this.currentChapter.start) / this.currentChapterDuration
bufferedPercent = Math.max(0, Math.min(1, (this.bufferedTime - this.currentChapter.start) / this.currentChapterDuration))
}
var ptWidth = Math.round(percentDone * this.trackWidth)
this.$refs.playedTrack.style.width = ptWidth + 'px'