mirror of
https://github.com/zadam/trilium.git
synced 2026-03-13 20:03:36 +01:00
feat(video_player): add keyboard shortcuts for toggling volume
This commit is contained in:
parent
6631a4a806
commit
d81dec94a9
@ -73,6 +73,16 @@ export default function VideoPreview({ note }: { note: FNote }) {
|
||||
video.muted = !video.muted;
|
||||
flashControls();
|
||||
break;
|
||||
case "ArrowUp":
|
||||
e.preventDefault();
|
||||
video.volume = Math.min(1, video.volume + 0.05);
|
||||
flashControls();
|
||||
break;
|
||||
case "ArrowDown":
|
||||
e.preventDefault();
|
||||
video.volume = Math.max(0, video.volume - 0.05);
|
||||
flashControls();
|
||||
break;
|
||||
case "Home":
|
||||
e.preventDefault();
|
||||
video.currentTime = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user