Move seeking support into the engine.

This commit is contained in:
Dermot Duffy
2023-01-24 19:36:54 -08:00
parent 13816c3025
commit 6b2036676c
12 changed files with 142 additions and 176 deletions
+5
View File
@@ -38,6 +38,11 @@ export class ViewMedia {
public isFavorite(): boolean | null {
return null;
}
public includesTime(seek: Date): boolean {
const startTime = this.getStartTime();
const endTime = this.getEndTime();
return !!startTime && !!endTime && seek >= startTime && seek <= endTime;
}
// Sets the favorite attribute (if any). This purely sets the media item as a
// favorite in JS.
-2
View File
@@ -1,14 +1,12 @@
// Minor / later:
// - TODO: ts-prune https://camchenry.com/blog/deleting-dead-code-in-typescript
// - TODO: getRecordingTitle should use getCameraTitle but need hass.
// - TODO: Pass timezone to recordings & event summary endpoint.
// Hard:
// - TODO: Implement dragging the timeline seeking forward in both Frigate recordings & events.
// - TODO: Implement gallery.
// - TODO: Remove FrigateBrowseMediaSource if not necessary (post-gallery).
// - TODO: Remove browse-media.ts TODOs.
// - TODO: In generateMediaViewerContext there is an assumption that recordings start/end on the hour, which is true for Frigate but that assumption should be in the engine.
// - TODO: What should the timeline do when an event is clicked on that is not in the queryResults (or if queryResults is empty)?
// - TODO: Should the timeline data source clear events (as it currently does) when the query changes?