Skip to content

Build your personal knowledge base with Trilium Notes

feat(video_player): add shortcuts to just to beginning/end

Elian Doran6631a4a806f7
diff --git a/apps/client/src/widgets/type_widgets/file/Video.tsx b/apps/client/src/widgets/type_widgets/file/Video.tsx
index ce98690d30..d797a855be 100644
--- a/apps/client/src/widgets/type_widgets/file/Video.tsx
+++ b/apps/client/src/widgets/type_widgets/file/Video.tsx
@@ -73,6 +73,16 @@ export default function VideoPreview({ note }: { note: FNote }) {
video.muted = !video.muted;
flashControls();
break;
+ case "Home":
+ e.preventDefault();
+ video.currentTime = 0;
+ flashControls();
+ break;
+ case "End":
+ e.preventDefault();
+ video.currentTime = video.duration;
+ flashControls();
+ break;
}
}, [togglePlayback, flashControls]);