mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
Fix seeking
This commit is contained in:
parent
6f86fe13ed
commit
db40177868
@ -353,7 +353,7 @@ function PreviewFramesPlayer({
|
||||
|
||||
return previewFrames.map((frame) =>
|
||||
// @ts-expect-error we know this item will exist
|
||||
parseFloat(frame.split("-").slice(undefined, -5)),
|
||||
parseFloat(frame.split("-").at(-1).slice(undefined, -5)),
|
||||
);
|
||||
}, [previewFrames]);
|
||||
|
||||
|
||||
@ -500,7 +500,7 @@ function VideoPreview({
|
||||
</video>
|
||||
<Slider
|
||||
ref={sliderRef}
|
||||
className="absolute inset-x-0 bottom-0 z-30 pointer-events-none"
|
||||
className="absolute inset-x-0 bottom-0 z-30"
|
||||
value={[progress]}
|
||||
onValueChange={onManualSeek}
|
||||
onValueCommit={onStopManualSeek}
|
||||
|
||||
@ -811,7 +811,17 @@ function MotionReview({
|
||||
isPlaying={playing}
|
||||
onPlayPause={setPlaying}
|
||||
onSeek={(diff) => {
|
||||
const wasPlaying = playing;
|
||||
|
||||
if (wasPlaying) {
|
||||
setPlaying(false);
|
||||
}
|
||||
|
||||
setCurrentTime(currentTime + diff);
|
||||
|
||||
if (wasPlaying) {
|
||||
setTimeout(() => setPlaying(true), 100);
|
||||
}
|
||||
}}
|
||||
show={currentTime < timeRange.before - 4}
|
||||
/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user