mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 15:15:22 +03:00
clean up for new type
This commit is contained in:
parent
86c770038d
commit
24f3f02d09
@ -1,8 +1,8 @@
|
|||||||
import { Timeline } from "@/types/timeline";
|
import { ObjectLifecycleSequence } from "@/types/timeline";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
type TimelineEventOverlayProps = {
|
type TimelineEventOverlayProps = {
|
||||||
timeline: Timeline;
|
timeline: ObjectLifecycleSequence;
|
||||||
cameraConfig: {
|
cameraConfig: {
|
||||||
detect: {
|
detect: {
|
||||||
width: number;
|
width: number;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { Recording } from "@/types/record";
|
import { Recording } from "@/types/record";
|
||||||
import { DynamicPlayback } from "@/types/playback";
|
import { DynamicPlayback } from "@/types/playback";
|
||||||
import { PreviewController } from "../PreviewPlayer";
|
import { PreviewController } from "../PreviewPlayer";
|
||||||
import { TimeRange, Timeline } from "@/types/timeline";
|
import { TimeRange, ObjectLifecycleSequence } from "@/types/timeline";
|
||||||
|
|
||||||
type PlayerMode = "playback" | "scrubbing";
|
type PlayerMode = "playback" | "scrubbing";
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ export class DynamicVideoController {
|
|||||||
private playerController: HTMLVideoElement;
|
private playerController: HTMLVideoElement;
|
||||||
private previewController: PreviewController;
|
private previewController: PreviewController;
|
||||||
private setNoRecording: (noRecs: boolean) => void;
|
private setNoRecording: (noRecs: boolean) => void;
|
||||||
private setFocusedItem: (timeline: Timeline) => void;
|
private setFocusedItem: (timeline: ObjectLifecycleSequence) => void;
|
||||||
private playerMode: PlayerMode = "playback";
|
private playerMode: PlayerMode = "playback";
|
||||||
|
|
||||||
// playback
|
// playback
|
||||||
@ -27,7 +27,7 @@ export class DynamicVideoController {
|
|||||||
annotationOffset: number,
|
annotationOffset: number,
|
||||||
defaultMode: PlayerMode,
|
defaultMode: PlayerMode,
|
||||||
setNoRecording: (noRecs: boolean) => void,
|
setNoRecording: (noRecs: boolean) => void,
|
||||||
setFocusedItem: (timeline: Timeline) => void,
|
setFocusedItem: (timeline: ObjectLifecycleSequence) => void,
|
||||||
) {
|
) {
|
||||||
this.camera = camera;
|
this.camera = camera;
|
||||||
this.playerController = playerController;
|
this.playerController = playerController;
|
||||||
@ -119,7 +119,7 @@ export class DynamicVideoController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
seekToTimelineItem(timeline: Timeline) {
|
seekToTimelineItem(timeline: ObjectLifecycleSequence) {
|
||||||
this.playerController.pause();
|
this.playerController.pause();
|
||||||
this.seekToTimestamp(timeline.timestamp + this.annotationOffset);
|
this.seekToTimestamp(timeline.timestamp + this.annotationOffset);
|
||||||
this.setFocusedItem(timeline);
|
this.setFocusedItem(timeline);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user