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