mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-12-13 22:00:28 +05:30
Add j, k, l keybindings to Player (#362)
This commit is contained in:
parent
61dd638ccd
commit
5bc9f653c1
@ -250,7 +250,7 @@ export default {
|
|||||||
.then(hotkeys => {
|
.then(hotkeys => {
|
||||||
this.hotkeys = hotkeys;
|
this.hotkeys = hotkeys;
|
||||||
var self = this;
|
var self = this;
|
||||||
hotkeys("f,m,space,up,down,left,right", function(e, handler) {
|
hotkeys("f,m,j,k,l,space,up,down,left,right", function(e, handler) {
|
||||||
const videoEl = self.$refs.videoEl;
|
const videoEl = self.$refs.videoEl;
|
||||||
switch (handler.key) {
|
switch (handler.key) {
|
||||||
case "f":
|
case "f":
|
||||||
@ -262,6 +262,15 @@ export default {
|
|||||||
videoEl.muted = !videoEl.muted;
|
videoEl.muted = !videoEl.muted;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
break;
|
break;
|
||||||
|
case "j":
|
||||||
|
videoEl.currentTime = Math.max(videoEl.currentTime - 15, 0);
|
||||||
|
e.preventDefault();
|
||||||
|
break;
|
||||||
|
case "l":
|
||||||
|
videoEl.currentTime = videoEl.currentTime + 15;
|
||||||
|
e.preventDefault();
|
||||||
|
break;
|
||||||
|
case "k":
|
||||||
case "space":
|
case "space":
|
||||||
if (videoEl.paused) videoEl.play();
|
if (videoEl.paused) videoEl.play();
|
||||||
else videoEl.pause();
|
else videoEl.pause();
|
||||||
|
Loading…
Reference in New Issue
Block a user