Keyboard up and down

This commit is contained in:
zisra 2023-03-30 23:25:49 +00:00
parent 54d1af0e0a
commit 4a52fc11ed
1 changed files with 10 additions and 0 deletions

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;