1
0
mirror of https://github.com/TeamPiped/Piped.git synced 2024-12-14 06:10:28 +05:30

Run yarn lint.

This commit is contained in:
FireMasterK 2022-01-12 05:31:00 +00:00
parent 2886ad966b
commit 7314642efa
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -81,103 +81,103 @@ export default {
.then(hotkeys => { .then(hotkeys => {
this.hotkeys = hotkeys; this.hotkeys = hotkeys;
var self = this; var self = this;
hotkeys( 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(
"f,m,j,k,l,c,space,up,down,left,right,0,1,2,3,4,5,6,7,8,9,shift+,,shift+.", e,
function (e, handler) { handler,
const videoEl = self.$refs.videoEl; ) {
console.log(handler.key); const videoEl = self.$refs.videoEl;
switch (handler.key) { console.log(handler.key);
case "f": switch (handler.key) {
self.$ui.getControls().toggleFullScreen(); case "f":
e.preventDefault(); self.$ui.getControls().toggleFullScreen();
break; e.preventDefault();
case "m": break;
videoEl.muted = !videoEl.muted; case "m":
e.preventDefault(); videoEl.muted = !videoEl.muted;
break; e.preventDefault();
case "j": break;
videoEl.currentTime = Math.max(videoEl.currentTime - 15, 0); case "j":
e.preventDefault(); videoEl.currentTime = Math.max(videoEl.currentTime - 15, 0);
break; e.preventDefault();
case "l": break;
videoEl.currentTime = videoEl.currentTime + 15; case "l":
e.preventDefault(); videoEl.currentTime = videoEl.currentTime + 15;
break; e.preventDefault();
case "c": break;
self.$player.setTextTrackVisibility(!self.$player.isTextTrackVisible()); case "c":
e.preventDefault(); self.$player.setTextTrackVisibility(!self.$player.isTextTrackVisible());
break; e.preventDefault();
case "k": break;
case "space": case "k":
if (videoEl.paused) videoEl.play(); case "space":
else videoEl.pause(); if (videoEl.paused) videoEl.play();
e.preventDefault(); else videoEl.pause();
break; e.preventDefault();
case "up": break;
videoEl.volume = Math.min(videoEl.volume + 0.05, 1); case "up":
e.preventDefault(); videoEl.volume = Math.min(videoEl.volume + 0.05, 1);
break; e.preventDefault();
case "down": break;
videoEl.volume = Math.max(videoEl.volume - 0.05, 0); case "down":
e.preventDefault(); videoEl.volume = Math.max(videoEl.volume - 0.05, 0);
break; e.preventDefault();
case "left": break;
videoEl.currentTime = Math.max(videoEl.currentTime - 5, 0); case "left":
e.preventDefault(); videoEl.currentTime = Math.max(videoEl.currentTime - 5, 0);
break; e.preventDefault();
case "right": break;
videoEl.currentTime = videoEl.currentTime + 5; case "right":
e.preventDefault(); videoEl.currentTime = videoEl.currentTime + 5;
break; e.preventDefault();
case "0": break;
videoEl.currentTime = 0; case "0":
e.preventDefault(); videoEl.currentTime = 0;
break; e.preventDefault();
case "1": break;
videoEl.currentTime = videoEl.duration * 0.1; case "1":
e.preventDefault(); videoEl.currentTime = videoEl.duration * 0.1;
break; e.preventDefault();
case "2": break;
videoEl.currentTime = videoEl.duration * 0.2; case "2":
e.preventDefault(); videoEl.currentTime = videoEl.duration * 0.2;
break; e.preventDefault();
case "3": break;
videoEl.currentTime = videoEl.duration * 0.3; case "3":
e.preventDefault(); videoEl.currentTime = videoEl.duration * 0.3;
break; e.preventDefault();
case "4": break;
videoEl.currentTime = videoEl.duration * 0.4; case "4":
e.preventDefault(); videoEl.currentTime = videoEl.duration * 0.4;
break; e.preventDefault();
case "5": break;
videoEl.currentTime = videoEl.duration * 0.5; case "5":
e.preventDefault(); videoEl.currentTime = videoEl.duration * 0.5;
break; e.preventDefault();
case "6": break;
videoEl.currentTime = videoEl.duration * 0.6; case "6":
e.preventDefault(); videoEl.currentTime = videoEl.duration * 0.6;
break; e.preventDefault();
case "7": break;
videoEl.currentTime = videoEl.duration * 0.7; case "7":
e.preventDefault(); videoEl.currentTime = videoEl.duration * 0.7;
break; e.preventDefault();
case "8": break;
videoEl.currentTime = videoEl.duration * 0.8; case "8":
e.preventDefault(); videoEl.currentTime = videoEl.duration * 0.8;
break; e.preventDefault();
case "9": break;
videoEl.currentTime = videoEl.duration * 0.9; case "9":
e.preventDefault(); videoEl.currentTime = videoEl.duration * 0.9;
break; e.preventDefault();
case "shift+,": break;
self.$player.trickPlay(Math.max(videoEl.playbackRate - 0.25, 0.25)); case "shift+,":
break; self.$player.trickPlay(Math.max(videoEl.playbackRate - 0.25, 0.25));
case "shift+.": break;
self.$player.trickPlay(Math.min(videoEl.playbackRate + 0.25, 2)); case "shift+.":
break; self.$player.trickPlay(Math.min(videoEl.playbackRate + 0.25, 2));
} break;
}, }
); });
}); });
}, },
deactivated() { deactivated() {