mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-11 02:25:08 +01:00
Merge pull request #243 from JipFr/dev
Add volume up / down keyboard events
This commit is contained in:
commit
48f54dd7cc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user