mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -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",
|
||||
39: "ArrowRight",
|
||||
40: "ArrowDown",
|
||||
412: "MediaRewind", // MediaRewind (Tizen/WebOS)
|
||||
413: "MediaStop", // MediaStop (Tizen/WebOS)
|
||||
415: "MediaPlay", // MediaPlay (Tizen/WebOS)
|
||||
417: "MediaFastForward", // MediaFastForward (Tizen/WebOS)
|
||||
461: "Back", // Back (WebOS)
|
||||
10009: "Back", // Back (Tizen)
|
||||
10232: "MediaTrackPrevious", // MediaTrackPrevious (Tizen)
|
||||
10233: "MediaTrackNext", // MediaTrackNext (Tizen)
|
||||
10252: "MediaPlayPause" // MediaPlayPause (Tizen)
|
||||
// MediaRewind (Tizen/WebOS)
|
||||
412: "MediaRewind",
|
||||
// MediaStop (Tizen/WebOS)
|
||||
413: "MediaStop",
|
||||
// MediaPlay (Tizen/WebOS)
|
||||
415: "MediaPlay",
|
||||
// MediaFastForward (Tizen/WebOS)
|
||||
417: "MediaFastForward",
|
||||
// Back (WebOS)
|
||||
461: "Back",
|
||||
// Back (Tizen)
|
||||
10009: "Back",
|
||||
// MediaTrackPrevious (Tizen)
|
||||
10232: "MediaTrackPrevious",
|
||||
// MediaTrackNext (Tizen)
|
||||
10233: "MediaTrackNext",
|
||||
// MediaPlayPause (Tizen)
|
||||
10252: "MediaPlayPause"
|
||||
};
|
||||
|
||||
var hasFieldKey = false;
|
||||
|
@ -1105,7 +1105,6 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
|
||||
case "Enter":
|
||||
showOsd();
|
||||
break;
|
||||
|
||||
case "Escape":
|
||||
case "Back":
|
||||
// Ignore key when some dialog is opened
|
||||
@ -1114,52 +1113,45 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
|
||||
e.stopPropagation();
|
||||
}
|
||||
break;
|
||||
|
||||
case "k":
|
||||
playbackManager.playPause(currentPlayer);
|
||||
showOsd();
|
||||
break;
|
||||
|
||||
case "l":
|
||||
case "ArrowRight":
|
||||
case "Right":
|
||||
playbackManager.fastForward(currentPlayer);
|
||||
showOsd();
|
||||
break;
|
||||
|
||||
case "j":
|
||||
case "ArrowLeft":
|
||||
case "Left":
|
||||
playbackManager.rewind(currentPlayer);
|
||||
showOsd();
|
||||
break;
|
||||
|
||||
case "f":
|
||||
if (!e.ctrlKey && !e.metaKey) {
|
||||
playbackManager.toggleFullscreen(currentPlayer);
|
||||
showOsd();
|
||||
}
|
||||
break;
|
||||
|
||||
case "m":
|
||||
playbackManager.toggleMute(currentPlayer);
|
||||
showOsd();
|
||||
break;
|
||||
|
||||
case "NavigationLeft":
|
||||
case "GamepadDPadLeft":
|
||||
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()) {
|
||||
playbackManager.rewind(currentPlayer);
|
||||
showOsd();
|
||||
}
|
||||
break;
|
||||
|
||||
case "NavigationRight":
|
||||
case "GamepadDPadRight":
|
||||
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()) {
|
||||
playbackManager.fastForward(currentPlayer);
|
||||
showOsd();
|
||||
|
Loading…
Reference in New Issue
Block a user