feat(player): add arrow up/down controls for volume

This commit is contained in:
Jip Fr 2023-03-30 19:53:24 +02:00
parent e91f65dd91
commit e2dd74c0af

View File

@ -63,6 +63,14 @@ export function KeyboardShortcutsAction() {
toggleVolume();
break;
case "arrowdown":
controls.setVolume(Math.max(mediaPlaying.volume - 0.1, 0));
break;
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;