feat(results): add live annotation overlay on raw video playback

This commit is contained in:
2026-07-08 17:24:20 +05:30
parent 23186ffd29
commit 7a82e17bbb
13 changed files with 540 additions and 57 deletions

View File

@@ -2,7 +2,10 @@
import { RefObject, useEffect } from 'react';
import { AlertTriangle, Loader2 } from 'lucide-react';
import type { DetectionResultLog } from '@/types';
import type {
DetectionResultLog,
VideoAnnotationFrameDetection,
} from '@/types';
import { useDetectionThumbnails } from './useDetectionThumbnails';
import BoundingBoxOverlay from '@/components/annotation/boundingBoxOverlay';
import {
@@ -21,7 +24,7 @@ import {
interface AnnotatedVideoPlayerProps {
videoRef: RefObject<MediaPlayerInstance | null>;
logs: DetectionResultLog[];
visibleLogs: DetectionResultLog[];
visibleDetections: VideoAnnotationFrameDetection[];
videoWidth: number;
videoHeight: number;
videoUrl: string | null;
@@ -60,7 +63,7 @@ function VideoFrameSync({
export default function AnnotatedVideoPlayer({
videoRef,
logs,
visibleLogs,
visibleDetections,
videoWidth,
videoHeight,
videoUrl,
@@ -92,7 +95,7 @@ export default function AnnotatedVideoPlayer({
</MediaProvider>
<VideoFrameSync onVideoFrame={onVideoFrame} />
<BoundingBoxOverlay
detections={visibleLogs}
detections={visibleDetections}
videoWidth={videoWidth}
videoHeight={videoHeight}
/>