@hyperframes/producer 0.8.185 → 0.8.186
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 +17 -4
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +65 -65
- package/dist/index.js +29 -5
- package/dist/public-server.js +24 -3
- package/dist/renderRequest.d.ts +1 -0
- package/dist/services/htmlCompiler.d.ts +3 -2
- package/dist/services/render/motionBlurRoute.d.ts +11 -1
- package/dist/services/render/stages/compileStage.d.ts +2 -0
- package/dist/services/renderOrchestrator.d.ts +1 -0
- package/package.json +7 -7
package/dist/distributed.js
CHANGED
|
@@ -2255,7 +2255,10 @@ function stripCompilerMountBootstrap(source) {
|
|
|
2255
2255
|
""
|
|
2256
2256
|
);
|
|
2257
2257
|
}
|
|
2258
|
-
function
|
|
2258
|
+
function runtimeRoot(document2) {
|
|
2259
|
+
return document2.querySelector('[data-composition-id][data-root="true"]') ?? document2.querySelector("[data-composition-id]");
|
|
2260
|
+
}
|
|
2261
|
+
function detectRenderModeHints(html, pageMotionBlur) {
|
|
2259
2262
|
const reasons = [];
|
|
2260
2263
|
const { document: document2 } = parseHTML4(html);
|
|
2261
2264
|
if (document2.querySelector("canvas[layoutsubtree]")) {
|
|
@@ -2263,6 +2266,11 @@ function detectRenderModeHints(html) {
|
|
|
2263
2266
|
code: "htmlInCanvas",
|
|
2264
2267
|
message: "Detected html-in-canvas API (layoutsubtree canvas). Chrome does not support concurrent drawElementImage across multiple workers; render is pinned to a single worker."
|
|
2265
2268
|
});
|
|
2269
|
+
} else if (pageMotionBlur !== "off" && runtimeRoot(document2)?.getAttribute("data-motion-blur") === "on") {
|
|
2270
|
+
reasons.push({
|
|
2271
|
+
code: "captureMotionBlur",
|
|
2272
|
+
message: 'Detected capture motion blur (data-motion-blur="on"), which draws each frame with html-in-canvas; routed through screenshot capture mode.'
|
|
2273
|
+
});
|
|
2266
2274
|
}
|
|
2267
2275
|
if (document2.querySelector("iframe")) {
|
|
2268
2276
|
reasons.push({
|
|
@@ -3294,7 +3302,7 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
|
|
|
3294
3302
|
/(<(?:video|audio)\b[^>]*?)\s+preload\s*=\s*["']none["']/gi,
|
|
3295
3303
|
"$1"
|
|
3296
3304
|
);
|
|
3297
|
-
const renderModeHints = detectRenderModeHints(sanitizedHtml);
|
|
3305
|
+
const renderModeHints = detectRenderModeHints(sanitizedHtml, options.pageMotionBlur);
|
|
3298
3306
|
const hasShaderTransitions = detectShaderTransitionUsage(sanitizedHtml);
|
|
3299
3307
|
const usesThreeDTransforms = detectThreeDTransformUsage(sanitizedHtml);
|
|
3300
3308
|
const usesMixBlendMode = detectMixBlendModeUsage(sanitizedHtml);
|
|
@@ -3779,6 +3787,7 @@ async function runCompileStage(input) {
|
|
|
3779
3787
|
abortSignal,
|
|
3780
3788
|
variables: input.variables,
|
|
3781
3789
|
urlByAbsentLocalPath: input.urlByAbsentLocalPath,
|
|
3790
|
+
pageMotionBlur: input.pageMotionBlur,
|
|
3782
3791
|
animatedGifCacheDir: cfg.extractCacheDir ? join6(cfg.extractCacheDir, "animated-gif") : void 0,
|
|
3783
3792
|
ffmpegProcessTimeout: cfg.ffmpegProcessTimeout
|
|
3784
3793
|
});
|
|
@@ -4075,6 +4084,7 @@ async function runProbeStage(input) {
|
|
|
4075
4084
|
variables: job.config.variables,
|
|
4076
4085
|
deviceScaleFactor,
|
|
4077
4086
|
motionBlur,
|
|
4087
|
+
pageMotionBlur: job.config.pageMotionBlur,
|
|
4078
4088
|
requiresWebGpu: compositionRequiresWebGpu(compiled.html),
|
|
4079
4089
|
subTimelineWaitMemo
|
|
4080
4090
|
};
|
|
@@ -6806,7 +6816,8 @@ function buildSyntheticRenderJob(input) {
|
|
|
6806
6816
|
hdrMode: input.hdrMode,
|
|
6807
6817
|
strictness: input.strictness,
|
|
6808
6818
|
producerConfig: input.producerConfig,
|
|
6809
|
-
variables: input.variables
|
|
6819
|
+
variables: input.variables,
|
|
6820
|
+
pageMotionBlur: "off"
|
|
6810
6821
|
};
|
|
6811
6822
|
return createRenderJob(renderConfig);
|
|
6812
6823
|
}
|
|
@@ -6930,6 +6941,7 @@ function buildChunkCaptureOptions(input) {
|
|
|
6930
6941
|
skipReadinessVideoIds: input.skipReadinessVideoIds,
|
|
6931
6942
|
videoMetadataHints: input.videoMetadataHints,
|
|
6932
6943
|
...videoCaptureBeyondViewport !== void 0 ? { captureBeyondViewport: videoCaptureBeyondViewport } : {},
|
|
6944
|
+
pageMotionBlur: "distributed-render",
|
|
6933
6945
|
// A fixed warmup count keeps `beginFrameTimeTicks` host-independent.
|
|
6934
6946
|
lockWarmupTicks: true,
|
|
6935
6947
|
requiresWebGpu: compositionRequiresWebGpu3(input.html)
|
|
@@ -8596,7 +8608,8 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
8596
8608
|
// Distributed renders must not capture host-specific system fonts —
|
|
8597
8609
|
// the Lambda/worker filesystem won't have the same fonts installed.
|
|
8598
8610
|
allowSystemFontCapture: false,
|
|
8599
|
-
variables: config.variables
|
|
8611
|
+
variables: config.variables,
|
|
8612
|
+
pageMotionBlur: job.config.pageMotionBlur
|
|
8600
8613
|
});
|
|
8601
8614
|
logPlanStage(log, "compile", stageStarted);
|
|
8602
8615
|
let compiled = compileResult.compiled;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.1.0",
|
|
3
3
|
"buildId": "dev",
|
|
4
|
-
"sha256": "
|
|
4
|
+
"sha256": "70c934b140617fa19f8ceb0444d107d1232d9c56987c0207d4e05fc658356a42",
|
|
5
5
|
"artifacts": {
|
|
6
6
|
"iife": "hyperframe.runtime.iife.js",
|
|
7
7
|
"esm": "hyperframe.runtime.mjs"
|