mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-12 10:07:36 +03:00
hide bounding boxes when playing
This commit is contained in:
parent
0ebc9a2e92
commit
83354be7f6
@ -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}
|
||||
|
||||
@ -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}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user