mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-22 05:27:20 +00:00
Run yarn lint.
This commit is contained in:
parent
9b1f7086f4
commit
a9e7d79121
@ -75,103 +75,103 @@ export default {
|
|||||||
.then(hotkeys => {
|
.then(hotkeys => {
|
||||||
this.hotkeys = hotkeys;
|
this.hotkeys = hotkeys;
|
||||||
var self = this;
|
var self = this;
|
||||||
hotkeys("f,m,j,k,l,c,space,up,down,left,right,0,1,2,3,4,5,6,7,8,9,shift+,,shift+.", function(
|
hotkeys(
|
||||||
e,
|
"f,m,j,k,l,c,space,up,down,left,right,0,1,2,3,4,5,6,7,8,9,shift+,,shift+.",
|
||||||
handler,
|
function (e, handler) {
|
||||||
) {
|
const videoEl = self.$refs.videoEl;
|
||||||
const videoEl = self.$refs.videoEl;
|
console.log(handler.key);
|
||||||
console.log(handler.key);
|
switch (handler.key) {
|
||||||
switch (handler.key) {
|
case "f":
|
||||||
case "f":
|
self.$ui.getControls().toggleFullScreen();
|
||||||
self.$ui.getControls().toggleFullScreen();
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "m":
|
||||||
case "m":
|
videoEl.muted = !videoEl.muted;
|
||||||
videoEl.muted = !videoEl.muted;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "j":
|
||||||
case "j":
|
videoEl.currentTime = Math.max(videoEl.currentTime - 15, 0);
|
||||||
videoEl.currentTime = Math.max(videoEl.currentTime - 15, 0);
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "l":
|
||||||
case "l":
|
videoEl.currentTime = videoEl.currentTime + 15;
|
||||||
videoEl.currentTime = videoEl.currentTime + 15;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "c":
|
||||||
case "c":
|
self.$player.setTextTrackVisibility(!self.$player.isTextTrackVisible());
|
||||||
self.$player.setTextTrackVisibility(!self.$player.isTextTrackVisible());
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "k":
|
||||||
case "k":
|
case "space":
|
||||||
case "space":
|
if (videoEl.paused) videoEl.play();
|
||||||
if (videoEl.paused) videoEl.play();
|
else videoEl.pause();
|
||||||
else videoEl.pause();
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "up":
|
||||||
case "up":
|
videoEl.volume = Math.min(videoEl.volume + 0.05, 1);
|
||||||
videoEl.volume = Math.min(videoEl.volume + 0.05, 1);
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "down":
|
||||||
case "down":
|
videoEl.volume = Math.max(videoEl.volume - 0.05, 0);
|
||||||
videoEl.volume = Math.max(videoEl.volume - 0.05, 0);
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "left":
|
||||||
case "left":
|
videoEl.currentTime = Math.max(videoEl.currentTime - 5, 0);
|
||||||
videoEl.currentTime = Math.max(videoEl.currentTime - 5, 0);
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "right":
|
||||||
case "right":
|
videoEl.currentTime = videoEl.currentTime + 5;
|
||||||
videoEl.currentTime = videoEl.currentTime + 5;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "0":
|
||||||
case "0":
|
videoEl.currentTime = 0;
|
||||||
videoEl.currentTime = 0;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "1":
|
||||||
case "1":
|
videoEl.currentTime = videoEl.duration * 0.1;
|
||||||
videoEl.currentTime = videoEl.duration * 0.1;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "2":
|
||||||
case "2":
|
videoEl.currentTime = videoEl.duration * 0.2;
|
||||||
videoEl.currentTime = videoEl.duration * 0.2;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "3":
|
||||||
case "3":
|
videoEl.currentTime = videoEl.duration * 0.3;
|
||||||
videoEl.currentTime = videoEl.duration * 0.3;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "4":
|
||||||
case "4":
|
videoEl.currentTime = videoEl.duration * 0.4;
|
||||||
videoEl.currentTime = videoEl.duration * 0.4;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "5":
|
||||||
case "5":
|
videoEl.currentTime = videoEl.duration * 0.5;
|
||||||
videoEl.currentTime = videoEl.duration * 0.5;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "6":
|
||||||
case "6":
|
videoEl.currentTime = videoEl.duration * 0.6;
|
||||||
videoEl.currentTime = videoEl.duration * 0.6;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "7":
|
||||||
case "7":
|
videoEl.currentTime = videoEl.duration * 0.7;
|
||||||
videoEl.currentTime = videoEl.duration * 0.7;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "8":
|
||||||
case "8":
|
videoEl.currentTime = videoEl.duration * 0.8;
|
||||||
videoEl.currentTime = videoEl.duration * 0.8;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "9":
|
||||||
case "9":
|
videoEl.currentTime = videoEl.duration * 0.9;
|
||||||
videoEl.currentTime = videoEl.duration * 0.9;
|
e.preventDefault();
|
||||||
e.preventDefault();
|
break;
|
||||||
break;
|
case "shift+,":
|
||||||
case "shift+,":
|
self.$player.trickPlay(Math.max(videoEl.playbackRate - 0.25, 0.25));
|
||||||
self.$player.trickPlay(Math.max(videoEl.playbackRate - 0.25, 0.25));
|
break;
|
||||||
break;
|
case "shift+.":
|
||||||
case "shift+.":
|
self.$player.trickPlay(Math.min(videoEl.playbackRate + 0.25, 2));
|
||||||
self.$player.trickPlay(Math.min(videoEl.playbackRate + 0.25, 2));
|
break;
|
||||||
break;
|
}
|
||||||
}
|
},
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
deactivated() {
|
deactivated() {
|
||||||
|
Loading…
Reference in New Issue
Block a user