@hyperframes/producer 0.9.87 → 0.9.88
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.
- package/dist/distributed.js +13 -10
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +67 -67
- package/dist/index.js +14 -11
- package/dist/public-server.js +10 -9
- package/dist/services/distributed/chunkFrames.d.ts +1 -0
- package/dist/services/render/deferredVideoFrames.d.ts +1 -0
- package/dist/services/render/shared.d.ts +3 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1641,12 +1641,12 @@ var workerPhasesByJob = /* @__PURE__ */ new WeakMap();
|
|
|
1641
1641
|
function forgetWorkerPhases(job) {
|
|
1642
1642
|
workerPhasesByJob.delete(job);
|
|
1643
1643
|
}
|
|
1644
|
-
var
|
|
1645
|
-
function
|
|
1646
|
-
|
|
1644
|
+
var captureActivityByJob = /* @__PURE__ */ new WeakMap();
|
|
1645
|
+
function noteCaptureActivity(job) {
|
|
1646
|
+
captureActivityByJob.set(job, (captureActivityByJob.get(job) ?? 0) + 1);
|
|
1647
1647
|
}
|
|
1648
|
-
function
|
|
1649
|
-
return
|
|
1648
|
+
function captureActivity(job) {
|
|
1649
|
+
return captureActivityByJob.get(job) ?? 0;
|
|
1650
1650
|
}
|
|
1651
1651
|
function describeWorkerPhases(job) {
|
|
1652
1652
|
const phases = workerPhasesByJob.get(job);
|
|
@@ -6256,7 +6256,8 @@ async function extractDeferredFrames(input) {
|
|
|
6256
6256
|
outputDir: input.outputRoot,
|
|
6257
6257
|
format: range.format,
|
|
6258
6258
|
frameRanges: contiguousRuns(indexes),
|
|
6259
|
-
shownBox: input.shownBoxes?.get(video.videoId)
|
|
6259
|
+
shownBox: input.shownBoxes?.get(video.videoId),
|
|
6260
|
+
...input.onProgress && { onProgress: input.onProgress }
|
|
6260
6261
|
},
|
|
6261
6262
|
input.signal,
|
|
6262
6263
|
input.cfg
|
|
@@ -11166,7 +11167,7 @@ async function runProbeStage(input) {
|
|
|
11166
11167
|
staticDedupMemo,
|
|
11167
11168
|
compositionHash: computeCompositionObservabilityHash(compiled.html),
|
|
11168
11169
|
deferStaticDedup: true,
|
|
11169
|
-
onStaticDedupActivity: () =>
|
|
11170
|
+
onStaticDedupActivity: () => noteCaptureActivity(job)
|
|
11170
11171
|
};
|
|
11171
11172
|
const PROBE_MAX_ATTEMPTS = 2;
|
|
11172
11173
|
for (let attempt = 1; attempt <= PROBE_MAX_ATTEMPTS; attempt++) {
|
|
@@ -15209,7 +15210,7 @@ function frameStallRule(job, totalFrames, probeStartupMs) {
|
|
|
15209
15210
|
tailMs: Math.max(TAIL_STALL_MS, noProgressMs),
|
|
15210
15211
|
detail: () => describeWorkerPhases(job),
|
|
15211
15212
|
attemptOpened: () => forgetWorkerPhases(job),
|
|
15212
|
-
activity: () =>
|
|
15213
|
+
activity: () => captureActivity(job)
|
|
15213
15214
|
};
|
|
15214
15215
|
}
|
|
15215
15216
|
function isRecoverableParallelCaptureError(error) {
|
|
@@ -16537,7 +16538,7 @@ async function executeRenderPipeline(input) {
|
|
|
16537
16538
|
subTimelineWaitMemo,
|
|
16538
16539
|
staticDedupMemo,
|
|
16539
16540
|
compositionHash,
|
|
16540
|
-
onStaticDedupActivity: () =>
|
|
16541
|
+
onStaticDedupActivity: () => noteCaptureActivity(job),
|
|
16541
16542
|
// Probe-resolved duration: drawElement self-verification derives its
|
|
16542
16543
|
// sample frame indices from this so they land inside the drained range.
|
|
16543
16544
|
compositionDurationSeconds: job.duration,
|
|
@@ -18990,6 +18991,7 @@ async function extractDeferredVideoFramesForChunk(input) {
|
|
|
18990
18991
|
outputRoot: input.outputRoot,
|
|
18991
18992
|
cfg: input.cfg,
|
|
18992
18993
|
shownBoxes: input.shownBoxes,
|
|
18994
|
+
...input.onProgress && { onProgress: input.onProgress },
|
|
18993
18995
|
sourceOf: (video) => {
|
|
18994
18996
|
const range = planned.get(video.videoId).deferredRange;
|
|
18995
18997
|
const remoteUrl = remoteSources[range.sourcePath];
|
|
@@ -22004,7 +22006,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
22004
22006
|
deferredVideos.filter((video) => remoteVideoIds.has(video.videoId))
|
|
22005
22007
|
)
|
|
22006
22008
|
});
|
|
22007
|
-
captureOptions.onStaticDedupActivity = () =>
|
|
22009
|
+
captureOptions.onStaticDedupActivity = () => noteCaptureActivity(job);
|
|
22008
22010
|
const captureFrames = effectiveChunkFrames(framesInChunk, slice.captureCost);
|
|
22009
22011
|
const chunkWorkerCount = resolveChunkCaptureWorkers(
|
|
22010
22012
|
captureFrames,
|
|
@@ -22121,7 +22123,8 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
22121
22123
|
outputRoot: videoFramesDir,
|
|
22122
22124
|
cfg,
|
|
22123
22125
|
remoteSources,
|
|
22124
|
-
shownBoxes
|
|
22126
|
+
shownBoxes,
|
|
22127
|
+
onProgress: () => noteCaptureActivity(job)
|
|
22125
22128
|
}).then((frames) => {
|
|
22126
22129
|
videoExtractMs = Date.now() - extractStarted;
|
|
22127
22130
|
return frames;
|
package/dist/public-server.js
CHANGED
|
@@ -1673,12 +1673,12 @@ var workerPhasesByJob = /* @__PURE__ */ new WeakMap();
|
|
|
1673
1673
|
function forgetWorkerPhases(job) {
|
|
1674
1674
|
workerPhasesByJob.delete(job);
|
|
1675
1675
|
}
|
|
1676
|
-
var
|
|
1677
|
-
function
|
|
1678
|
-
|
|
1676
|
+
var captureActivityByJob = /* @__PURE__ */ new WeakMap();
|
|
1677
|
+
function noteCaptureActivity(job) {
|
|
1678
|
+
captureActivityByJob.set(job, (captureActivityByJob.get(job) ?? 0) + 1);
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1681
|
-
return
|
|
1680
|
+
function captureActivity(job) {
|
|
1681
|
+
return captureActivityByJob.get(job) ?? 0;
|
|
1682
1682
|
}
|
|
1683
1683
|
function describeWorkerPhases(job) {
|
|
1684
1684
|
const phases = workerPhasesByJob.get(job);
|
|
@@ -6287,7 +6287,8 @@ async function extractDeferredFrames(input) {
|
|
|
6287
6287
|
outputDir: input.outputRoot,
|
|
6288
6288
|
format: range.format,
|
|
6289
6289
|
frameRanges: contiguousRuns(indexes),
|
|
6290
|
-
shownBox: input.shownBoxes?.get(video.videoId)
|
|
6290
|
+
shownBox: input.shownBoxes?.get(video.videoId),
|
|
6291
|
+
...input.onProgress && { onProgress: input.onProgress }
|
|
6291
6292
|
},
|
|
6292
6293
|
input.signal,
|
|
6293
6294
|
input.cfg
|
|
@@ -11178,7 +11179,7 @@ async function runProbeStage(input) {
|
|
|
11178
11179
|
staticDedupMemo,
|
|
11179
11180
|
compositionHash: computeCompositionObservabilityHash(compiled.html),
|
|
11180
11181
|
deferStaticDedup: true,
|
|
11181
|
-
onStaticDedupActivity: () =>
|
|
11182
|
+
onStaticDedupActivity: () => noteCaptureActivity(job)
|
|
11182
11183
|
};
|
|
11183
11184
|
const PROBE_MAX_ATTEMPTS = 2;
|
|
11184
11185
|
for (let attempt = 1; attempt <= PROBE_MAX_ATTEMPTS; attempt++) {
|
|
@@ -15184,7 +15185,7 @@ function frameStallRule(job, totalFrames, probeStartupMs) {
|
|
|
15184
15185
|
tailMs: Math.max(TAIL_STALL_MS, noProgressMs),
|
|
15185
15186
|
detail: () => describeWorkerPhases(job),
|
|
15186
15187
|
attemptOpened: () => forgetWorkerPhases(job),
|
|
15187
|
-
activity: () =>
|
|
15188
|
+
activity: () => captureActivity(job)
|
|
15188
15189
|
};
|
|
15189
15190
|
}
|
|
15190
15191
|
function isRecoverableParallelCaptureError(error) {
|
|
@@ -16512,7 +16513,7 @@ async function executeRenderPipeline(input) {
|
|
|
16512
16513
|
subTimelineWaitMemo,
|
|
16513
16514
|
staticDedupMemo,
|
|
16514
16515
|
compositionHash,
|
|
16515
|
-
onStaticDedupActivity: () =>
|
|
16516
|
+
onStaticDedupActivity: () => noteCaptureActivity(job),
|
|
16516
16517
|
// Probe-resolved duration: drawElement self-verification derives its
|
|
16517
16518
|
// sample frame indices from this so they land inside the drained range.
|
|
16518
16519
|
compositionDurationSeconds: job.duration,
|
|
@@ -57,4 +57,5 @@ export declare function extractDeferredVideoFramesForChunk(input: {
|
|
|
57
57
|
cfg: Pick<EngineConfig, "ffmpegProcessTimeout">;
|
|
58
58
|
remoteSources?: PlanV2RemoteSources;
|
|
59
59
|
shownBoxes?: ReadonlyMap<string, ShownBox>;
|
|
60
|
+
onProgress?: () => void;
|
|
60
61
|
}): Promise<ExtractedFrames[]>;
|
|
@@ -24,6 +24,7 @@ export declare function extractDeferredFrames(input: {
|
|
|
24
24
|
shownBoxes?: ReadonlyMap<string, ShownBox>;
|
|
25
25
|
/** The error to throw when the extractor returns no frame for an index the video shows. */
|
|
26
26
|
onMissingFrame: (video: ExtractedFrames, index: number) => Error;
|
|
27
|
+
onProgress?: () => void;
|
|
27
28
|
}): Promise<ExtractedFrames[]>;
|
|
28
29
|
/**
|
|
29
30
|
* Fills every deferred video in place with the frames a full extraction writes, into the folder it
|
|
@@ -122,9 +122,9 @@ export declare function audioWaitReporter(job: RenderJob, onProgress: ProgressCa
|
|
|
122
122
|
/** Seconds of the final file written, 90% to 99%: only a complete file reaches 100. */
|
|
123
123
|
export declare function reportAssembleProgress(job: RenderJob, done: number, total: number, onProgress: ProgressCallback | undefined): void;
|
|
124
124
|
export declare function forgetWorkerPhases(job: object): void;
|
|
125
|
-
/** Counts a
|
|
126
|
-
export declare function
|
|
127
|
-
export declare function
|
|
125
|
+
/** Counts capture work between frames (still checks, a chunk's video frames); the stall watcher reads it. */
|
|
126
|
+
export declare function noteCaptureActivity(job: object): void;
|
|
127
|
+
export declare function captureActivity(job: object): number;
|
|
128
128
|
export declare function describeWorkerPhases(job: object): string | undefined;
|
|
129
129
|
/** Browser warm-up before the first frame, from the parallel workers' phase events. */
|
|
130
130
|
export declare function reportWorkerStartup(job: RenderJob, progress: ParallelProgress, onProgress: ProgressCallback | undefined): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.88",
|
|
4
4
|
"description": "HTML-to-video rendering engine using Chrome's BeginFrame API",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"postcss": "^8.4.0",
|
|
36
36
|
"puppeteer": "~25.13.0",
|
|
37
37
|
"puppeteer-core": "^25.13.0",
|
|
38
|
-
"@hyperframes/
|
|
39
|
-
"@hyperframes/
|
|
40
|
-
"@hyperframes/
|
|
41
|
-
"@hyperframes/parsers": "0.9.
|
|
42
|
-
"@hyperframes/studio-server": "0.9.
|
|
38
|
+
"@hyperframes/core": "0.9.88",
|
|
39
|
+
"@hyperframes/lint": "0.9.88",
|
|
40
|
+
"@hyperframes/engine": "0.9.88",
|
|
41
|
+
"@hyperframes/parsers": "0.9.88",
|
|
42
|
+
"@hyperframes/studio-server": "0.9.88"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^25.0.10",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"tsx": "^4.21.0",
|
|
49
49
|
"typescript": "^5.7.2",
|
|
50
50
|
"vitest": "^4.1.12",
|
|
51
|
-
"@hyperframes/aws-lambda": "0.9.
|
|
51
|
+
"@hyperframes/aws-lambda": "0.9.88"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|