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.