Misc fixes (#18289)

* Fix key not moved

* Account for HLS start offset when seeking and calculating update time
This commit is contained in:
Nicolas Mowen
2025-05-18 18:23:01 -05:00
committed by GitHub
parent f4d5ebf4db
commit 717517aeb5
4 changed files with 48 additions and 10 deletions
@@ -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;