Fixed timeline value

This commit is contained in:
Kylart 2020-01-15 21:21:20 +01:00
parent ad89315bea
commit 1daad3ce73
4 changed files with 9 additions and 7 deletions

View File

@ -50,7 +50,7 @@
dark, hide-details, color='secondary accent-2',
:step='0',
:buffer='buffered',
:value='timeline / 10',
:value='timeline',
:duration='duration',
@input='changeTimeline'
)

View File

@ -37,7 +37,6 @@ export default {
'hasSubs',
'subs',
'currentLang',
// 'waiting',
'pause'
],
@ -54,7 +53,7 @@ export default {
return {
...this.$store.state.streaming.player.controls,
timeline: this.timeline,
currentTime: this.formatTime(this.timeline),
currentTime: this.formatTime((this.timeline / 100) * this.duration),
duration: this.formatTime(this.duration),
buffered: this.buffered,

View File

@ -63,7 +63,7 @@ export default {
layoutShow: true,
propertyMap: {
'time-pos': 'timeline',
'percent-pos': 'timeline',
'media-title': 'name'
},
@ -109,6 +109,7 @@ export default {
[
'pause',
'time-pos',
'percent-pos',
'duration',
'media-title',
'track-list/count'

View File

@ -34,14 +34,16 @@ export default {
window.addEventListener('click', this.click)
window.addEventListener('contextmenu', this.click)
window.addEventListener('wheel', this.wheel)
window.addEventListener('keypress', this.keypress)
window.addEventListener('keydown', this.keypress)
},
beforeDestroy () {
window.removeEventListener('click', this.click)
window.removeEventListener('contextmenu', this.click)
window.removeEventListener('wheel', this.wheel)
window.removeEventListener('keypress', this.keypress)
window.removeEventListener('keydown', this.keypress)
},
methods: {
@ -104,7 +106,7 @@ export default {
// Ignore exit keys for default keybindings settings.
if ([
'q', 'Q', 'ESC', 'POWER', 'STOP',
'CLOSE_WIN', 'CLOSE_WIN', 'Ctrl+c',
'CLOSE_WIN', 'Ctrl+c',
'AR_PLAY_HOLD', 'AR_CENTER_HOLD'
].includes(key)) return