Minor bugfixes

This commit is contained in:
Martin Ziegler
2025-11-30 16:53:05 +01:00
parent 17c37a7ccd
commit 06d1780fd8
3 changed files with 13 additions and 2 deletions
@@ -25,6 +25,17 @@ export function TimelapseViewer({ src, title, downloadFilename, onClose }: Timel
}
}, [playbackRate]);
// Close on Escape key
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
onClose();
}
};
window.addEventListener('keydown', handleKeyDown);
return () => window.removeEventListener('keydown', handleKeyDown);
}, [onClose]);
useEffect(() => {
const video = videoRef.current;
if (!video) return;