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

This commit is contained in:
Dmitry Lyzo 2023-05-23 00:41:35 +03:00
parent 884ce171ea
commit 76c55116ce

View file

@ -1056,6 +1056,21 @@ import { appRouter } from '../../../components/appRouter';
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;