@t3lnet/sceneforge 1.0.31 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -67,8 +67,9 @@ export function createCDPRecorder(page, options) {
|
|
|
67
67
|
frameCount += 1;
|
|
68
68
|
|
|
69
69
|
// Track when we receive the first frame (wall clock time)
|
|
70
|
+
const frameReceivedTime = Date.now();
|
|
70
71
|
if (firstFrameTime === null) {
|
|
71
|
-
firstFrameTime =
|
|
72
|
+
firstFrameTime = frameReceivedTime;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
// Acknowledge the frame immediately to continue receiving
|
|
@@ -81,7 +82,9 @@ export function createCDPRecorder(page, options) {
|
|
|
81
82
|
return;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
// Use wall-clock time (seconds since first frame) instead of CDP timestamp
|
|
86
|
+
// This ensures video duration matches actual demo duration for script alignment
|
|
87
|
+
const timestamp = (frameReceivedTime - firstFrameTime) / 1000;
|
|
85
88
|
const frameNumber = nextFrameNumber;
|
|
86
89
|
nextFrameNumber += 1;
|
|
87
90
|
const paddedNumber = String(frameNumber).padStart(8, "0");
|