mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
Apply suggestions from code review
This commit is contained in:
parent
ec6ce5aa14
commit
e3dd871500
@ -16,15 +16,24 @@ define(["inputManager", "layoutManager"], function (inputManager, layoutManager)
|
|||||||
38: "ArrowUp",
|
38: "ArrowUp",
|
||||||
39: "ArrowRight",
|
39: "ArrowRight",
|
||||||
40: "ArrowDown",
|
40: "ArrowDown",
|
||||||
412: "MediaRewind", // MediaRewind (Tizen/WebOS)
|
// MediaRewind (Tizen/WebOS)
|
||||||
413: "MediaStop", // MediaStop (Tizen/WebOS)
|
412: "MediaRewind",
|
||||||
415: "MediaPlay", // MediaPlay (Tizen/WebOS)
|
// MediaStop (Tizen/WebOS)
|
||||||
417: "MediaFastForward", // MediaFastForward (Tizen/WebOS)
|
413: "MediaStop",
|
||||||
461: "Back", // Back (WebOS)
|
// MediaPlay (Tizen/WebOS)
|
||||||
10009: "Back", // Back (Tizen)
|
415: "MediaPlay",
|
||||||
10232: "MediaTrackPrevious", // MediaTrackPrevious (Tizen)
|
// MediaFastForward (Tizen/WebOS)
|
||||||
10233: "MediaTrackNext", // MediaTrackNext (Tizen)
|
417: "MediaFastForward",
|
||||||
10252: "MediaPlayPause" // MediaPlayPause (Tizen)
|
// Back (WebOS)
|
||||||
|
461: "Back",
|
||||||
|
// Back (Tizen)
|
||||||
|
10009: "Back",
|
||||||
|
// MediaTrackPrevious (Tizen)
|
||||||
|
10232: "MediaTrackPrevious",
|
||||||
|
// MediaTrackNext (Tizen)
|
||||||
|
10233: "MediaTrackNext",
|
||||||
|
// MediaPlayPause (Tizen)
|
||||||
|
10252: "MediaPlayPause"
|
||||||
};
|
};
|
||||||
|
|
||||||
var hasFieldKey = false;
|
var hasFieldKey = false;
|
||||||
|
@ -1105,7 +1105,6 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
|
|||||||
case "Enter":
|
case "Enter":
|
||||||
showOsd();
|
showOsd();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Escape":
|
case "Escape":
|
||||||
case "Back":
|
case "Back":
|
||||||
// Ignore key when some dialog is opened
|
// Ignore key when some dialog is opened
|
||||||
@ -1114,52 +1113,45 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "k":
|
case "k":
|
||||||
playbackManager.playPause(currentPlayer);
|
playbackManager.playPause(currentPlayer);
|
||||||
showOsd();
|
showOsd();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "l":
|
case "l":
|
||||||
case "ArrowRight":
|
case "ArrowRight":
|
||||||
case "Right":
|
case "Right":
|
||||||
playbackManager.fastForward(currentPlayer);
|
playbackManager.fastForward(currentPlayer);
|
||||||
showOsd();
|
showOsd();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "j":
|
case "j":
|
||||||
case "ArrowLeft":
|
case "ArrowLeft":
|
||||||
case "Left":
|
case "Left":
|
||||||
playbackManager.rewind(currentPlayer);
|
playbackManager.rewind(currentPlayer);
|
||||||
showOsd();
|
showOsd();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "f":
|
case "f":
|
||||||
if (!e.ctrlKey && !e.metaKey) {
|
if (!e.ctrlKey && !e.metaKey) {
|
||||||
playbackManager.toggleFullscreen(currentPlayer);
|
playbackManager.toggleFullscreen(currentPlayer);
|
||||||
showOsd();
|
showOsd();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "m":
|
case "m":
|
||||||
playbackManager.toggleMute(currentPlayer);
|
playbackManager.toggleMute(currentPlayer);
|
||||||
showOsd();
|
showOsd();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "NavigationLeft":
|
case "NavigationLeft":
|
||||||
case "GamepadDPadLeft":
|
case "GamepadDPadLeft":
|
||||||
case "GamepadLeftThumbstickLeft":
|
case "GamepadLeftThumbstickLeft":
|
||||||
// Ignores gamepad events that are always triggered, even when not focused.
|
// Ignores gamepad events that are always triggered, even when not focused.
|
||||||
if (document.hasFocus()) {
|
if (document.hasFocus()) {
|
||||||
playbackManager.rewind(currentPlayer);
|
playbackManager.rewind(currentPlayer);
|
||||||
showOsd();
|
showOsd();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "NavigationRight":
|
case "NavigationRight":
|
||||||
case "GamepadDPadRight":
|
case "GamepadDPadRight":
|
||||||
case "GamepadLeftThumbstickRight":
|
case "GamepadLeftThumbstickRight":
|
||||||
// Ignores gamepad events that are always triggered, even when not focused.
|
// Ignores gamepad events that are always triggered, even when not focused.
|
||||||
if (document.hasFocus()) {
|
if (document.hasFocus()) {
|
||||||
playbackManager.fastForward(currentPlayer);
|
playbackManager.fastForward(currentPlayer);
|
||||||
showOsd();
|
showOsd();
|
||||||
|
Loading…
Reference in New Issue
Block a user