From 4a52fc11ed80404f8214353f0a858678a6a44c28 Mon Sep 17 00:00:00 2001 From: zisra <100528712+zisra@users.noreply.github.com> Date: Thu, 30 Mar 2023 23:25:49 +0000 Subject: [PATCH] Keyboard up and down --- .../components/actions/KeyboardShortcutsAction.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/video/components/actions/KeyboardShortcutsAction.tsx b/src/video/components/actions/KeyboardShortcutsAction.tsx index cab92baa..24e8b813 100644 --- a/src/video/components/actions/KeyboardShortcutsAction.tsx +++ b/src/video/components/actions/KeyboardShortcutsAction.tsx @@ -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;