From 2b44a9eb46af45f3d6986fc0d017c3ce3ed4d205 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 1 Jun 2026 12:02:51 -0500 Subject: [PATCH] start playback a few seconds before the change so the motion is in view --- web/src/views/motion-search/MotionSearchView.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/views/motion-search/MotionSearchView.tsx b/web/src/views/motion-search/MotionSearchView.tsx index 117a70975c..12eae7f67f 100644 --- a/web/src/views/motion-search/MotionSearchView.tsx +++ b/web/src/views/motion-search/MotionSearchView.tsx @@ -51,7 +51,7 @@ import { useTimelineUtils } from "@/hooks/use-timeline-utils"; import { useCameraPreviews } from "@/hooks/use-camera-previews"; import { getChunkedTimeDay } from "@/utils/timelineUtil"; -import { MotionData, ZoomLevel } from "@/types/review"; +import { MotionData, REVIEW_PADDING, ZoomLevel } from "@/types/review"; import { ASPECT_VERTICAL_LAYOUT, ASPECT_WIDE_LAYOUT, @@ -958,7 +958,8 @@ export default function MotionSearchView({ return; } - manuallySetCurrentTime(result.timestamp, true); + // start playback a few seconds before the change so the motion is in view + manuallySetCurrentTime(result.timestamp - REVIEW_PADDING, true); }, [manuallySetCurrentTime, onDaySelect, timeRange], ); @@ -972,7 +973,7 @@ export default function MotionSearchView({ pendingSeekTime >= timeRange.after && pendingSeekTime <= timeRange.before ) { - manuallySetCurrentTime(pendingSeekTime, true); + manuallySetCurrentTime(pendingSeekTime - REVIEW_PADDING, true); setPendingSeekTime(null); pendingSeekTimeRef.current = null; }