Support "<" and ">" shortcuts

This commit is contained in:
root
2022-01-29 13:29:34 +05:30
parent 9be262930b
commit dbaf3fddc3
+9 -1
View File
@@ -290,7 +290,6 @@ export default {
this.$player.destroy()
this.$player = undefined
}
if (this.unsubToKeybindings) this.unsubToKeybindings()
if (this.$refs.container) this.$refs.container.querySelectorAll('div').forEach(node => node.remove())
}
},
@@ -350,12 +349,21 @@ export default {
ArrowRight (e) {
videoEl.currentTime = videoEl.currentTime + 5
e.preventDefault()
},
'Shift+>' (e) {
self.$player.trickPlay(Math.min(videoEl.playbackRate + 0.25, 2))
e.preventDefault()
},
'Shift+<' (e) {
self.$player.trickPlay(Math.max(videoEl.playbackRate - 0.25, 0.25))
e.preventDefault()
}
})
},
beforeDestroy () {
this.destroy()
if (this.unsubToKeybindings) this.unsubToKeybindings()
}
}
</script>