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:
parent
e91f65dd91
commit
e2dd74c0af
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue