Recordings viewer (#9985)

* Reduce redundant code and don't pull new items when marking as reviewed

* Chunk recording times and run playback

* fix overwriting existing data

* Implement scrubbing

* Show refresh button

* Remove old history

* Fix race condition

* Cleanup handling

* Remove console
This commit is contained in:
Nicolas Mowen
2024-02-22 17:03:34 -07:00
committed by GitHub
parent fa57a3db28
commit f84d2db406
18 changed files with 486 additions and 1680 deletions

View File

@@ -1,43 +0,0 @@
type CardsData = {
[day: string]: {
[hour: string]: {
[groupKey: string]: Card;
};
};
};
type Card = {
camera: string;
time: number;
entries: Timeline[];
uniqueKeys: string[];
};
type Preview = {
camera: string;
src: string;
type: string;
start: number;
end: number;
};
interface HistoryFilter extends FilterType {
cameras: string[];
labels: string[];
before: number | undefined;
after: number | undefined;
detailLevel: "normal" | "extra" | "full";
}
type HistoryTimeline = {
start: number;
end: number;
playbackItems: TimelinePlayback[];
};
type TimelinePlayback = {
camera: string;
range: { start: number; end: number };
timelineItems: Timeline[];
relevantPreview: Preview | undefined;
};

7
web/src/types/preview.ts Normal file
View File

@@ -0,0 +1,7 @@
type Preview = {
camera: string;
src: string;
type: string;
start: number;
end: number;
};