From 7413810fa48fccd2e1abf240dbc6f3953cfd0cc7 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 20 May 2024 08:44:39 -0600 Subject: [PATCH] Don't timeshift recordings (#11449) --- .../player/dynamic/DynamicVideoPlayer.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/web/src/components/player/dynamic/DynamicVideoPlayer.tsx b/web/src/components/player/dynamic/DynamicVideoPlayer.tsx index 6089208b2..7241d475a 100644 --- a/web/src/components/player/dynamic/DynamicVideoPlayer.tsx +++ b/web/src/components/player/dynamic/DynamicVideoPlayer.tsx @@ -12,7 +12,6 @@ import ActivityIndicator from "@/components/indicators/activity-indicator"; import { VideoResolutionType } from "@/types/live"; import axios from "axios"; import { cn } from "@/lib/utils"; -import { getTimestampOffset } from "@/utils/dateUtil"; /** * Dynamically switches between video playback and scrubbing preview player. @@ -148,14 +147,13 @@ export default function DynamicVideoPlayer({ // state of playback player - const recordingParams = useMemo(() => { - const timeRangeOffset = getTimestampOffset(timeRange.before); - - return { - before: timeRange.before + timeRangeOffset, - after: timeRange.after + timeRangeOffset, - }; - }, [timeRange]); + const recordingParams = useMemo( + () => ({ + before: timeRange.before, + after: timeRange.after, + }), + [timeRange], + ); const { data: recordings } = useSWR( [`${camera}/recordings`, recordingParams], { revalidateOnFocus: false },