mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-12 18:17: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 = {
|
type ObjectTrackOverlayProps = {
|
||||||
camera: string;
|
camera: string;
|
||||||
selectedObjectId: string;
|
selectedObjectId: string;
|
||||||
|
showBoundingBoxes?: boolean;
|
||||||
currentTime: number;
|
currentTime: number;
|
||||||
videoWidth: number;
|
videoWidth: number;
|
||||||
videoHeight: number;
|
videoHeight: number;
|
||||||
@ -26,6 +27,7 @@ type ObjectTrackOverlayProps = {
|
|||||||
export default function ObjectTrackOverlay({
|
export default function ObjectTrackOverlay({
|
||||||
camera,
|
camera,
|
||||||
selectedObjectId,
|
selectedObjectId,
|
||||||
|
showBoundingBoxes = false,
|
||||||
currentTime,
|
currentTime,
|
||||||
videoWidth,
|
videoWidth,
|
||||||
videoHeight,
|
videoHeight,
|
||||||
@ -366,7 +368,7 @@ export default function ObjectTrackOverlay({
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{currentBoundingBox && (
|
{currentBoundingBox && showBoundingBoxes && (
|
||||||
<g>
|
<g>
|
||||||
<rect
|
<rect
|
||||||
x={currentBoundingBox.left * videoWidth}
|
x={currentBoundingBox.left * videoWidth}
|
||||||
|
|||||||
@ -324,6 +324,7 @@ export default function HlsVideoPlayer({
|
|||||||
key={`${selectedObjectId}-${currentTime}`}
|
key={`${selectedObjectId}-${currentTime}`}
|
||||||
camera={camera}
|
camera={camera}
|
||||||
selectedObjectId={selectedObjectId}
|
selectedObjectId={selectedObjectId}
|
||||||
|
showBoundingBoxes={!isPlaying}
|
||||||
currentTime={currentTime}
|
currentTime={currentTime}
|
||||||
videoWidth={videoDimensions.width}
|
videoWidth={videoDimensions.width}
|
||||||
videoHeight={videoDimensions.height}
|
videoHeight={videoDimensions.height}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user