mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-27 09:07:41 +03:00
Adjust based on inpoint
This commit is contained in:
parent
646387d8c2
commit
ea9e98ab78
@ -185,9 +185,16 @@ export default function DynamicVideoPlayer({
|
||||
playerRef.current.autoplay = !isScrubbing;
|
||||
}
|
||||
|
||||
const inpointOffset = calculateInpointOffset(
|
||||
recordingParams.after,
|
||||
(recordings || [])[0],
|
||||
);
|
||||
|
||||
setSource({
|
||||
playlist: `${apiHost}vod/${camera}/start/${recordingParams.after}/end/${recordingParams.before}/master.m3u8`,
|
||||
startPosition: startTimestamp ? startTimestamp - timeRange.after : 0,
|
||||
startPosition: startTimestamp
|
||||
? Math.max(0, startTimestamp - timeRange.after - inpointOffset)
|
||||
: 0,
|
||||
});
|
||||
|
||||
setLoadingTimeout(setTimeout(() => setIsLoading(true), 1000));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user