diff --git a/web/src/components/player/HlsVideoPlayer.tsx b/web/src/components/player/HlsVideoPlayer.tsx index 0462e7b7d..7e01b0588 100644 --- a/web/src/components/player/HlsVideoPlayer.tsx +++ b/web/src/components/player/HlsVideoPlayer.tsx @@ -278,10 +278,6 @@ export default function HlsVideoPlayer({ }, [videoRef, inpointOffset]); const handleSnapshot = useCallback(async () => { - if (isSnapshotLoading) { - return; - } - setIsSnapshotLoading(true); try { const frameTime = getVideoTime(); @@ -307,15 +303,7 @@ export default function HlsVideoPlayer({ } finally { setIsSnapshotLoading(false); } - }, [ - camera, - config?.ui?.timezone, - currentTime, - getVideoTime, - isSnapshotLoading, - t, - videoRef, - ]); + }, [camera, config?.ui?.timezone, currentTime, getVideoTime, t, videoRef]); const onSnapshot = camera ? handleSnapshot : undefined; return ( diff --git a/web/src/components/player/VideoControls.tsx b/web/src/components/player/VideoControls.tsx index 4e60c6376..875fc5076 100644 --- a/web/src/components/player/VideoControls.tsx +++ b/web/src/components/player/VideoControls.tsx @@ -307,7 +307,9 @@ export default function VideoControls({ aria-disabled={snapshotLoading} className={cn( "size-5", - snapshotLoading ? "cursor-not-allowed opacity-50" : "cursor-pointer", + snapshotLoading + ? "cursor-not-allowed opacity-50" + : "cursor-pointer", )} title={snapshotTitle} onClick={(e: React.MouseEvent) => {