mirror of
https://github.com/zadam/trilium.git
synced 2026-03-13 20:03:36 +01:00
feat(video_player): keyboard shortcut to toggle full-screen
This commit is contained in:
parent
471a46a030
commit
87229600d2
@ -58,6 +58,15 @@ export default function VideoPreview({ note }: { note: FNote }) {
|
||||
video.currentTime = Math.min(video.duration, video.currentTime + (e.ctrlKey ? 60 : 10));
|
||||
flashControls();
|
||||
break;
|
||||
case "f":
|
||||
case "F":
|
||||
e.preventDefault();
|
||||
if (document.fullscreenElement) {
|
||||
document.exitFullscreen();
|
||||
} else {
|
||||
wrapperRef.current?.requestFullscreen();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}, [togglePlayback, flashControls]);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user