Resume watch progress when switching formats
This commit is contained in:
parent
c5f99cf397
commit
3eb4a8ac0c
|
@ -560,12 +560,18 @@ export default Vue.extend({
|
|||
})
|
||||
return
|
||||
}
|
||||
|
||||
const watchedProgress = this.getWatchedProgress()
|
||||
this.activeFormat = 'dash'
|
||||
this.hidePlayer = true
|
||||
|
||||
setTimeout(() => {
|
||||
this.hidePlayer = false
|
||||
setTimeout(() => {
|
||||
const player = this.$refs.videoPlayer.player
|
||||
if (player !== null) {
|
||||
player.currentTime(watchedProgress)
|
||||
}
|
||||
}, 500)
|
||||
}, 100)
|
||||
},
|
||||
|
||||
|
@ -574,12 +580,19 @@ export default Vue.extend({
|
|||
return
|
||||
}
|
||||
|
||||
const watchedProgress = this.getWatchedProgress()
|
||||
this.activeFormat = 'legacy'
|
||||
this.activeSourceList = this.videoSourceList
|
||||
this.hidePlayer = true
|
||||
|
||||
setTimeout(() => {
|
||||
this.hidePlayer = false
|
||||
setTimeout(() => {
|
||||
const player = this.$refs.videoPlayer.player
|
||||
if (player !== null) {
|
||||
player.currentTime(watchedProgress)
|
||||
}
|
||||
}, 500)
|
||||
}, 100)
|
||||
},
|
||||
|
||||
|
@ -595,12 +608,19 @@ export default Vue.extend({
|
|||
return
|
||||
}
|
||||
|
||||
const watchedProgress = this.getWatchedProgress()
|
||||
this.activeFormat = 'audio'
|
||||
this.activeSourceList = this.audioSourceList
|
||||
this.hidePlayer = true
|
||||
|
||||
setTimeout(() => {
|
||||
this.hidePlayer = false
|
||||
setTimeout(() => {
|
||||
const player = this.$refs.videoPlayer.player
|
||||
if (player !== null) {
|
||||
player.currentTime(watchedProgress)
|
||||
}
|
||||
}, 500)
|
||||
}, 100)
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue