Skip to content

Commit

Permalink
Don't timeshift recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed May 20, 2024
1 parent 6e39d55 commit a4ae35e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions web/src/components/player/dynamic/DynamicVideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<Recording[]>(
[`${camera}/recordings`, recordingParams],
{ revalidateOnFocus: false },
Expand Down

0 comments on commit a4ae35e

Please sign in to comment.