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

Improve behaviour of space bar pausing/playing video

This commit is contained in:
Jack 2021-03-28 19:21:11 -04:00
parent 1c7ce790dc
commit 031e1c0f26

View file

@ -992,9 +992,13 @@ import { appRouter } from '../../../components/appRouter';
const key = keyboardnavigation.getKeyName(e);
const isKeyModified = e.ctrlKey || e.altKey || e.metaKey;
const currentElement = document.activeElement;
if (!currentVisibleMenu && e.keyCode === 32) {
if (e.keyCode === 32) {
if (!currentElement.className.split(' ').includes('btnPause')) {
// If the focused button is the pause button it will already play/pause it
playbackManager.playPause(currentPlayer);
}
showOsd();
return;
}