1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Change behavior of arrow keys and Enter when OSD is hidden

(cherry picked from commit 76c55116ce)
This commit is contained in:
Dmitry Lyzo 2023-05-23 00:41:35 +03:00
parent 0381af80f1
commit 8c8e240792

View file

@ -1195,6 +1195,21 @@ export default function (view) {
return;
}
if (layoutManager.tv && !currentVisibleMenu) {
// Change the behavior of some keys when the OSD is hidden
switch (key) {
case 'ArrowLeft':
case 'ArrowRight':
showOsd(nowPlayingPositionSlider);
nowPlayingPositionSlider.dispatchEvent(new KeyboardEvent(e.type, e));
return;
case 'Enter':
playbackManager.playPause(currentPlayer);
showOsd(btnPlayPause);
return;
}
}
if (layoutManager.tv && keyboardnavigation.isNavigationKey(key)) {
showOsd();
return;