Skip to content

Commit

Permalink
Use pre buffer for other links (blakeblackshear#11160)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Apr 29, 2024
1 parent c9246bd commit f946cf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/src/components/card/AnimatedEventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
import { useCallback, useMemo } from "react";
import useSWR from "swr";
import { FrigateConfig } from "@/types/frigateConfig";
import { ReviewSegment } from "@/types/review";
import { REVIEW_PADDING, ReviewSegment } from "@/types/review";
import { useNavigate } from "react-router-dom";
import { RecordingStartingPoint } from "@/types/record";
import axios from "axios";
Expand Down Expand Up @@ -39,7 +39,7 @@ export function AnimatedEventCard({ event }: AnimatedEventCardProps) {
severity: event.severity,
recording: {
camera: event.camera,
startTime: event.start_time,
startTime: event.start_time - REVIEW_PADDING,
severity: event.severity,
} as RecordingStartingPoint,
},
Expand Down
3 changes: 2 additions & 1 deletion web/src/views/events/RecordingView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { FrigateConfig } from "@/types/frigateConfig";
import { Preview } from "@/types/preview";
import {
MotionData,
REVIEW_PADDING,
ReviewFilter,
ReviewSegment,
ReviewSummary,
Expand Down Expand Up @@ -558,7 +559,7 @@ function Timeline({
currentTime={currentTime}
onClick={() => {
setScrubbing(true);
setCurrentTime(review.start_time);
setCurrentTime(review.start_time - REVIEW_PADDING);
setScrubbing(false);
}}
/>
Expand Down

0 comments on commit f946cf5

Please sign in to comment.