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:
parent
884ce171ea
commit
76c55116ce
1 changed files with 15 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue