feat(results): add live annotation overlay on raw video playback
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user