mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Object Lifecycle tweaks (#16648)
* Disable object path and add warning for autotracking cameras * clean up
This commit is contained in:
		
							parent
							
								
									11b1dbf0ff
								
							
						
					
					
						commit
						4f88a5f2ad
					
				@ -207,11 +207,15 @@ export default function ObjectLifecycle({
 | 
				
			|||||||
  // final object path with timeline points included
 | 
					  // final object path with timeline points included
 | 
				
			||||||
  const pathPoints = useMemo(() => {
 | 
					  const pathPoints = useMemo(() => {
 | 
				
			||||||
    // don't display a path if we don't have any saved path points
 | 
					    // don't display a path if we don't have any saved path points
 | 
				
			||||||
    if (savedPathPoints.length === 0) return [];
 | 
					    if (
 | 
				
			||||||
 | 
					      savedPathPoints.length === 0 ||
 | 
				
			||||||
 | 
					      config?.cameras[event.camera]?.onvif.autotracking.enabled_in_config
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					      return [];
 | 
				
			||||||
    return [...savedPathPoints, ...eventSequencePoints].sort(
 | 
					    return [...savedPathPoints, ...eventSequencePoints].sort(
 | 
				
			||||||
      (a, b) => a.timestamp - b.timestamp,
 | 
					      (a, b) => a.timestamp - b.timestamp,
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }, [savedPathPoints, eventSequencePoints]);
 | 
					  }, [savedPathPoints, eventSequencePoints, config, event]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const [timeIndex, setTimeIndex] = useState(0);
 | 
					  const [timeIndex, setTimeIndex] = useState(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -503,6 +507,11 @@ export default function ObjectLifecycle({
 | 
				
			|||||||
          {current + 1} of {eventSequence.length}
 | 
					          {current + 1} of {eventSequence.length}
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					      {config?.cameras[event.camera]?.onvif.autotracking.enabled_in_config && (
 | 
				
			||||||
 | 
					        <div className="-mt-2 mb-2 text-sm text-danger">
 | 
				
			||||||
 | 
					          Bounding box positions will be inaccurate for autotracking cameras.
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      )}
 | 
				
			||||||
      {showControls && (
 | 
					      {showControls && (
 | 
				
			||||||
        <AnnotationSettingsPane
 | 
					        <AnnotationSettingsPane
 | 
				
			||||||
          event={event}
 | 
					          event={event}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user