mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-04 01:48:54 +03:00
Misc fixes (#18289)
* Fix key not moved * Account for HLS start offset when seeking and calculating update time
This commit is contained in:
@@ -17,6 +17,7 @@ export class DynamicVideoController {
|
||||
// playback
|
||||
private recordings: Recording[] = [];
|
||||
private timeRange: TimeRange = { after: 0, before: 0 };
|
||||
private inpointOffset: number = 0;
|
||||
private annotationOffset: number;
|
||||
private timeToStart: number | undefined = undefined;
|
||||
|
||||
@@ -41,6 +42,7 @@ export class DynamicVideoController {
|
||||
newPlayback(newPlayback: DynamicPlayback) {
|
||||
this.recordings = newPlayback.recordings;
|
||||
this.timeRange = newPlayback.timeRange;
|
||||
this.inpointOffset = this.timeRange.after - this.recordings[0].start_time;
|
||||
|
||||
if (this.timeToStart) {
|
||||
this.seekToTimestamp(this.timeToStart);
|
||||
@@ -92,6 +94,9 @@ export class DynamicVideoController {
|
||||
return true;
|
||||
});
|
||||
|
||||
// adjust for HLS inpoint offset
|
||||
seekSeconds -= this.inpointOffset;
|
||||
|
||||
if (seekSeconds != 0) {
|
||||
this.playerController.currentTime = seekSeconds;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user