1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2025-01-01 16:37:39 +01:00

Keyboard up and down

This commit is contained in:
zisra 2023-03-30 23:25:49 +00:00
parent 54d1af0e0a
commit 4a52fc11ed

View file

@ -63,6 +63,16 @@ export function KeyboardShortcutsAction() {
toggleVolume(); toggleVolume();
break; break;
// Decrease volume
case "arrowdown":
controls.setVolume(Math.max(mediaPlaying.volume - 0.1, 0));
break;
// Increase volume
case "arrowup":
controls.setVolume(Math.min(mediaPlaying.volume + 0.1, 1));
break;
// Do a barrel Roll! // Do a barrel Roll!
case "r": case "r":
if (isRolling || evt.ctrlKey || evt.metaKey) return; if (isRolling || evt.ctrlKey || evt.metaKey) return;