Merge pull request #243 from JipFr/dev

Add volume up / down keyboard events
This commit is contained in:
mrjvs 2023-03-31 00:56:31 +02:00 committed by GitHub
commit 48f54dd7cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,16 @@ export function KeyboardShortcutsAction() {
toggleVolume();
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!
case "r":
if (isRolling || evt.ctrlKey || evt.metaKey) return;