mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Use pre buffer for other links (#11160)
This commit is contained in:
parent
c9246bd4ab
commit
f946cf55be
@ -3,7 +3,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
|
|||||||
import { useCallback, useMemo } from "react";
|
import { useCallback, useMemo } from "react";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { FrigateConfig } from "@/types/frigateConfig";
|
import { FrigateConfig } from "@/types/frigateConfig";
|
||||||
import { ReviewSegment } from "@/types/review";
|
import { REVIEW_PADDING, ReviewSegment } from "@/types/review";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { RecordingStartingPoint } from "@/types/record";
|
import { RecordingStartingPoint } from "@/types/record";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
@ -39,7 +39,7 @@ export function AnimatedEventCard({ event }: AnimatedEventCardProps) {
|
|||||||
severity: event.severity,
|
severity: event.severity,
|
||||||
recording: {
|
recording: {
|
||||||
camera: event.camera,
|
camera: event.camera,
|
||||||
startTime: event.start_time,
|
startTime: event.start_time - REVIEW_PADDING,
|
||||||
severity: event.severity,
|
severity: event.severity,
|
||||||
} as RecordingStartingPoint,
|
} as RecordingStartingPoint,
|
||||||
},
|
},
|
||||||
|
@ -15,6 +15,7 @@ import { FrigateConfig } from "@/types/frigateConfig";
|
|||||||
import { Preview } from "@/types/preview";
|
import { Preview } from "@/types/preview";
|
||||||
import {
|
import {
|
||||||
MotionData,
|
MotionData,
|
||||||
|
REVIEW_PADDING,
|
||||||
ReviewFilter,
|
ReviewFilter,
|
||||||
ReviewSegment,
|
ReviewSegment,
|
||||||
ReviewSummary,
|
ReviewSummary,
|
||||||
@ -558,7 +559,7 @@ function Timeline({
|
|||||||
currentTime={currentTime}
|
currentTime={currentTime}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setScrubbing(true);
|
setScrubbing(true);
|
||||||
setCurrentTime(review.start_time);
|
setCurrentTime(review.start_time - REVIEW_PADDING);
|
||||||
setScrubbing(false);
|
setScrubbing(false);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user