mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 13:45:25 +03:00
Use function for consistency
This commit is contained in:
parent
e674909c27
commit
fc23e257df
@ -12,7 +12,7 @@ import ActivityIndicator from "@/components/indicators/activity-indicator";
|
|||||||
import { VideoResolutionType } from "@/types/live";
|
import { VideoResolutionType } from "@/types/live";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { getUTCOffset } from "@/utils/dateUtil";
|
import { getTimestampOffset, getUTCOffset } from "@/utils/dateUtil";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamically switches between video playback and scrubbing preview player.
|
* Dynamically switches between video playback and scrubbing preview player.
|
||||||
@ -149,8 +149,7 @@ export default function DynamicVideoPlayer({
|
|||||||
// state of playback player
|
// state of playback player
|
||||||
|
|
||||||
const recordingParams = useMemo(() => {
|
const recordingParams = useMemo(() => {
|
||||||
const timeRangeOffset =
|
const timeRangeOffset = getTimestampOffset(timeRange.before);
|
||||||
(getUTCOffset(new Date(timeRange.before * 1000)) % 60) * 60;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
before: timeRange.before + timeRangeOffset,
|
before: timeRange.before + timeRangeOffset,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user