mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-20 17:26:33 +02:00
Minor bugfixes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user