1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-21 14:47:41 +01:00

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;