feat: add X-Frame-Time when returning snapshot (#21932)

Co-authored-by: Florent MORICONI <170678386+fmcloudconsulting@users.noreply.github.com>
This commit is contained in:
FL42
2026-02-08 15:47:06 +01:00
committed by Nicolas Mowen
parent 2db0269825
commit fef1fb36cc
3 changed files with 13 additions and 11 deletions

View File

@@ -761,7 +761,7 @@ async def event_snapshot(
if event_id in camera_state.tracked_objects:
tracked_obj = camera_state.tracked_objects.get(event_id)
if tracked_obj is not None:
jpg_bytes = tracked_obj.get_img_bytes(
jpg_bytes, frame_time = tracked_obj.get_img_bytes(
ext="jpg",
timestamp=params.timestamp,
bounding_box=params.bbox,
@@ -790,6 +790,7 @@ async def event_snapshot(
headers = {
"Content-Type": "image/jpeg",
"Cache-Control": "private, max-age=31536000" if event_complete else "no-store",
"X-Frame-Time": frame_time,
}
if params.download: