hide bounding boxes when playing

This commit is contained in:
Josh Hawkins 2025-10-16 14:26:54 -05:00
parent 0ebc9a2e92
commit 83354be7f6
2 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import { useTranslation } from "react-i18next";
type ObjectTrackOverlayProps = {
camera: string;
selectedObjectId: string;
showBoundingBoxes?: boolean;
currentTime: number;
videoWidth: number;
videoHeight: number;
@ -26,6 +27,7 @@ type ObjectTrackOverlayProps = {
export default function ObjectTrackOverlay({
camera,
selectedObjectId,
showBoundingBoxes = false,
currentTime,
videoWidth,
videoHeight,
@ -366,7 +368,7 @@ export default function ObjectTrackOverlay({
</Tooltip>
))}
{currentBoundingBox && (
{currentBoundingBox && showBoundingBoxes && (
<g>
<rect
x={currentBoundingBox.left * videoWidth}

View File

@ -324,6 +324,7 @@ export default function HlsVideoPlayer({
key={`${selectedObjectId}-${currentTime}`}
camera={camera}
selectedObjectId={selectedObjectId}
showBoundingBoxes={!isPlaying}
currentTime={currentTime}
videoWidth={videoDimensions.width}
videoHeight={videoDimensions.height}