hyperframes 0.8.203 → 0.8.204
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/{add-HVWZZBVO.js → add-HBFVYKGU.js} +11 -11
- package/dist/{animatedGifPrep-7SQD4XQY.js → animatedGifPrep-VBUKGEZ6.js} +5 -5
- package/dist/api.js +13 -13
- package/dist/{asset-H2D5ENJ6.js → asset-OVLMJY4S.js} +2 -2
- package/dist/{assetCataloger-PIRQXMHM.js → assetCataloger-K4INCLFU.js} +5 -5
- package/dist/{audio-F6TTYCGR.js → audio-JHW3HLHK.js} +11 -11
- package/dist/{auth-HK5IYSNR.js → auth-RH67KQMZ.js} +1 -1
- package/dist/{autoUpdate-DQMCXE6X.js → autoUpdate-JYR2RW5Z.js} +2 -2
- package/dist/{backgroundChecks-Y466WV7Y.js → backgroundChecks-DPHRM4HJ.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-PGJELR2B.js → batchRender-JFUWZR3M.js} +3 -3
- package/dist/{beats-AD2IJGBZ.js → beats-AWAFZGOT.js} +7 -7
- package/dist/{benchmark-B564OTLO.js → benchmark-VQCCULJ2.js} +8 -8
- package/dist/{browser-B7BELTLZ.js → browser-TT5L7D32.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-INYZKCJN.js → bundleWithLocalizedFonts-EHXEP5ZL.js} +2 -2
- package/dist/{capture-VMJVXQJ2.js → capture-5CM2P6CB.js} +8 -8
- package/dist/{capture-LKV2HS5Q.js → capture-Y7TGR3BI.js} +2 -2
- package/dist/{captureCompositionFrame-L2W6KSAL.js → captureCompositionFrame-LIT6U6C4.js} +10 -10
- package/dist/{catalog-5ETWOAL2.js → catalog-WZN2XB7D.js} +11 -11
- package/dist/{catch-up-3RWU3BRJ.js → catch-up-WZMQUW5H.js} +4 -4
- package/dist/{check-KD57MC5Z.js → check-YVJCDCJS.js} +33 -33
- package/dist/{checkBrowser-R72NYI4S.js → checkBrowser-7V2DGDVD.js} +28 -28
- package/dist/{chunk-VI7GBPF6.js → chunk-23RPCDGE.js} +2 -2
- package/dist/{chunk-WGZOPGHX.js → chunk-2756LXGY.js} +1 -1
- package/dist/{chunk-TMIX2WQL.js → chunk-34VLVDOU.js} +3 -3
- package/dist/{chunk-Q6B7MFTU.js → chunk-3GPDAE3D.js} +1 -1
- package/dist/{chunk-GOPGJXEQ.js → chunk-4CR23IYU.js} +4 -4
- package/dist/{chunk-3NUFUEAX.js → chunk-4HJMZI4H.js} +13 -13
- package/dist/{chunk-YOLS2E5P.js → chunk-54FO6TN7.js} +17 -17
- package/dist/{chunk-OKZZWUZN.js → chunk-54K7HW46.js} +1 -1
- package/dist/{chunk-TZKMAQOY.js → chunk-5RJSWYWL.js} +1 -1
- package/dist/{chunk-7RQXBL4L.js → chunk-5UW7WCHQ.js} +7 -7
- package/dist/{chunk-FRXPZCEP.js → chunk-65VFH2UV.js} +1 -1
- package/dist/{chunk-FE72SB2F.js → chunk-6KZY5RSV.js} +1 -1
- package/dist/{chunk-GOWNPWCJ.js → chunk-6RLP6RDE.js} +1 -1
- package/dist/{chunk-TRDUMOUW.js → chunk-7PRESGFT.js} +2 -2
- package/dist/{chunk-TT6HSBYK.js → chunk-7RB4I2E6.js} +5 -5
- package/dist/{chunk-VYFMJ2HM.js → chunk-AQS3MMEQ.js} +9 -9
- package/dist/{chunk-TVC4EI2W.js → chunk-CXZDIWMK.js} +1 -1
- package/dist/{chunk-DZZ6VHPY.js → chunk-D3EZHD2D.js} +1 -1
- package/dist/{chunk-X5PKA5KH.js → chunk-D5CAZ7R4.js} +2 -2
- package/dist/{chunk-ND5ELD7A.js → chunk-DBF6LLXB.js} +1 -1
- package/dist/{chunk-JVWPKIVV.js → chunk-DRDG46KK.js} +12 -12
- package/dist/{chunk-CTNWZASM.js → chunk-DTV3VHFE.js} +2 -2
- package/dist/{chunk-B7MRZJOW.js → chunk-EF7R5EBJ.js} +9 -9
- package/dist/{chunk-OKRH4JU3.js → chunk-GGEA5EHR.js} +1 -1
- package/dist/{chunk-HO2N4UWV.js → chunk-HBDQGIQA.js} +2 -2
- package/dist/{chunk-3YZ2ESXP.js → chunk-IJ6RY4CH.js} +1 -1
- package/dist/{chunk-JKUVH7BF.js → chunk-KOBPUFCN.js} +1 -1
- package/dist/{chunk-HAKKV3SY.js → chunk-LN5EJMSC.js} +7 -7
- package/dist/{chunk-FTARAZAL.js → chunk-LVMJXO45.js} +1 -1
- package/dist/{chunk-5GFNMC2F.js → chunk-MSH2F7VW.js} +1 -1
- package/dist/{chunk-H6NXL4VB.js → chunk-N3EJG2X4.js} +1 -1
- package/dist/{chunk-CAHZZOEC.js → chunk-NJT6SZGL.js} +1 -1
- package/dist/{chunk-2G6EI3WQ.js → chunk-OPFG563D.js} +1 -1
- package/dist/{chunk-35KHQKEX.js → chunk-QCQDUQVJ.js} +1 -1
- package/dist/{chunk-HYMW42OE.js → chunk-QWATUGUX.js} +3 -3
- package/dist/{chunk-DO2OTFCJ.js → chunk-QZ4HQQYS.js} +1 -1
- package/dist/{chunk-GX4CEJCX.js → chunk-RFCLI6TW.js} +3 -3
- package/dist/{chunk-KWQWEY6F.js → chunk-S35XO2ZA.js} +1 -1
- package/dist/{chunk-7SNVSO4A.js → chunk-TAYZSNYS.js} +1 -1
- package/dist/{chunk-BD3LJRJT.js → chunk-TBSYUEB7.js} +1 -1
- package/dist/{chunk-CFFPH6D3.js → chunk-TCI4MUT6.js} +1 -1
- package/dist/{chunk-RUVO77RK.js → chunk-TNOERLC6.js} +2 -2
- package/dist/{chunk-R36C6H32.js → chunk-TQH7BF7K.js} +1 -1
- package/dist/{chunk-VL5ES6ZM.js → chunk-UKXF4IPA.js} +5 -5
- package/dist/{chunk-4GV742H2.js → chunk-US6JSQ2L.js} +2 -2
- package/dist/{chunk-RZAPLMVM.js → chunk-VC3BMKYO.js} +3 -3
- package/dist/{chunk-HOQNNE3I.js → chunk-VCBZOU7U.js} +1 -1
- package/dist/{chunk-UVV2DKZR.js → chunk-WLD4PX3P.js} +2 -2
- package/dist/{chunk-ML7IPYOC.js → chunk-WM7GOKEP.js} +1 -1
- package/dist/{chunk-E3LRVXM2.js → chunk-WMCGD4XL.js} +1 -1
- package/dist/{chunk-RWHMKGJA.js → chunk-WXAQT63P.js} +3 -3
- package/dist/{chunk-JEFIEL6S.js → chunk-X7XICOVM.js} +1 -1
- package/dist/{chunk-MPGJNUML.js → chunk-XX5U64F2.js} +2 -2
- package/dist/{chunk-KBCV6BHL.js → chunk-Y63CT2ZC.js} +50 -36
- package/dist/{chunk-UNBGZQZ6.js → chunk-YIN2JAZE.js} +185 -78
- package/dist/{chunk-32SIPBON.js → chunk-YLGRZSH4.js} +1 -1
- package/dist/chunk-YRQPU7SV.js +3983 -0
- package/dist/{chunk-IREQUN2P.js → chunk-YU53JSUZ.js} +1 -1
- package/dist/{chunk-YJKSLCKV.js → chunk-ZBDVKLIU.js} +5 -5
- package/dist/{clean-7OBS6NMK.js → clean-3JE2KYTC.js} +14 -14
- package/dist/cli.js +53 -53
- package/dist/{cloud-JFL6IMUV.js → cloud-Z54BHP6G.js} +4 -4
- package/dist/{cloudrun-GHA4FXS3.js → cloudrun-4CPQLU5M.js} +4 -4
- package/dist/{compare-UFTPPNLD.js → compare-AQMLMTFD.js} +25 -25
- package/dist/{compiler-6LUGBYWD.js → compiler-LIJYMSEL.js} +2 -2
- package/dist/{component-4W3MT53Y.js → component-ZH37EIYB.js} +3 -3
- package/dist/{compositions-63M4AHPA.js → compositions-DF2FM6YD.js} +9 -9
- package/dist/{delete-XCSORSYR.js → delete-A3NSK2HH.js} +2 -2
- package/dist/{deploy-JUC2BVCE.js → deploy-6RC2DXPQ.js} +1 -1
- package/dist/{dist-SOMNYPEE.js → dist-VSIT3UAX.js} +2 -2
- package/dist/{doctor-LZ5KMUGS.js → doctor-RILK4ATO.js} +9 -9
- package/dist/{events-DSJDLP3V.js → events-B5EKVEPW.js} +3 -3
- package/dist/{events-XN26WXN3.js → events-SL434XAY.js} +2 -2
- package/dist/{feedback-VZZT77OU.js → feedback-S4PC6VAR.js} +7 -7
- package/dist/{ffmpeg-TU5BPXP6.js → ffmpeg-XSDPPZCU.js} +5 -5
- package/dist/{figma-BYBMKBNS.js → figma-MV2L6E2Z.js} +3 -3
- package/dist/fontLocalizeCli.js +7 -7
- package/dist/{get-JAKXQVNF.js → get-ID3Y3PCN.js} +2 -2
- package/dist/{gpuPolicy-A6BRKFTK.js → gpuPolicy-2LRMQOAD.js} +5 -5
- package/dist/{grade-compare-6TLS63GE.js → grade-compare-NV3TKIOO.js} +26 -26
- package/dist/{help-WMABNXSF.js → help-ZPT23LZ3.js} +1 -1
- package/dist/{history-PNOTK4KM.js → history-MZGDX3TR.js} +6 -6
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +17 -17
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-457IZRNA.js → info-FIZ4A54H.js} +7 -7
- package/dist/{init-QNOPZRQJ.js → init-WX4MNPL2.js} +25 -25
- package/dist/{inspect-4PECXE65.js → inspect-R5KWWKNJ.js} +26 -26
- package/dist/{installer-K6VCZN74.js → installer-CTV5FKYQ.js} +4 -4
- package/dist/{keyframes-KBR4RHQO.js → keyframes-FAJY5RK5.js} +6 -6
- package/dist/{lambda-FSC3XJOQ.js → lambda-3MCC2ZH7.js} +6 -6
- package/dist/{layout-PFXAKL65.js → layout-3RTVYRRN.js} +26 -26
- package/dist/{lint-MR7WHCBO.js → lint-ZDCVL7K4.js} +6 -6
- package/dist/{list-OCSE7GSX.js → list-SBCXW2UT.js} +2 -2
- package/dist/{login-M4L3MHVL.js → login-VQ2LQ2YG.js} +4 -4
- package/dist/{manager-G6G2WQU3.js → manager-ZRF6UXUM.js} +6 -6
- package/dist/{media-treatment-6ATFI5M2.js → media-treatment-MFIP7Q4G.js} +11 -11
- package/dist/{models-NPSWNLVS.js → models-OU36YZCT.js} +9 -9
- package/dist/{motionShot-HVPC2V7Q.js → motionShot-SHDUG7YR.js} +13 -13
- package/dist/{normalize-audio-YEEAY2TB.js → normalize-audio-7RTPEV7Y.js} +7 -7
- package/dist/{open-6LSE4QDQ.js → open-HT4RG32S.js} +11 -11
- package/dist/{parakeetRunner-HMDK2MEQ.js → parakeetRunner-DOVPZDCH.js} +10 -10
- package/dist/{pipeline-GQV2DL2T.js → pipeline-NIVQ6E2G.js} +6 -6
- package/dist/{play-NORPMDGV.js → play-HPX5SIRQ.js} +17 -17
- package/dist/{preflight-SDPP63GU.js → preflight-TNYC7EIS.js} +6 -6
- package/dist/{present-BVPAEHE6.js → present-QSOIMURR.js} +13 -13
- package/dist/{preview-C762R2VY.js → preview-WDO53XKK.js} +16 -16
- package/dist/{producer-XXFVYAW6.js → producer-G27KP3IY.js} +1 -1
- package/dist/{projectConfig-72HEHSHM.js → projectConfig-CP722RCM.js} +6 -6
- package/dist/{publication-QOK2NB7H.js → publication-LCWVBLDN.js} +2 -2
- package/dist/{publish-OVCPM2R4.js → publish-BIY6LEZ2.js} +8 -8
- package/dist/{remove-background-BK7G24LO.js → remove-background-NPLZGLZ3.js} +7 -7
- package/dist/{render-BA4DJGH2.js → render-HHUGUKG6.js} +26 -26
- package/dist/{render-3RV5ZZHB.js → render-IHNAZXA2.js} +5 -5
- package/dist/{render-KCRWPUSH.js → render-J57LAXB5.js} +13 -13
- package/dist/{render-batch-EKMNALAK.js → render-batch-FK26OQ5E.js} +5 -5
- package/dist/{resolver-ZQAEKX2N.js → resolver-FWJXO6DY.js} +4 -4
- package/dist/{sherpa-UPEEZCVJ.js → sherpa-BXFJU5EP.js} +9 -9
- package/dist/{skills-EBCABDEA.js → skills-7XS4HZBC.js} +5 -5
- package/dist/{skillsUpdateCheck-2TBQ3R7X.js → skillsUpdateCheck-MGU5KLR4.js} +3 -3
- package/dist/{snapshot-KRDQ6UFY.js → snapshot-O2PMEMKH.js} +30 -30
- package/dist/{src-FMPMLWOE.js → src-OQRG6BT7.js} +4 -4
- package/dist/{src-HODRARUH.js → src-Q4R2YPKA.js} +6 -6
- package/dist/{staticProjectServer-NBWPYBIH.js → staticProjectServer-6OY4VMO6.js} +14 -14
- package/dist/studio/assets/{hyperframes-player-C3pgGOtp.js → hyperframes-player-CttA4PW7.js} +1 -1
- package/dist/studio/assets/{index-BbcMyD3j.js → index-DmST2bTJ.js} +110 -110
- package/dist/studio/assets/{index-5EFQxr70.js → index-DpxSurnJ.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-BOV2DTPC.js → studio-api-YSUTKHV7.js} +7 -7
- package/dist/{studioServer-TSKSIQC3.js → studioServer-APGEQIW5.js} +43 -43
- package/dist/{telemetry-RLKGEBGR.js → telemetry-3B6EA5IU.js} +3 -3
- package/dist/{timeline-ADFTKSNX.js → timeline-QWM6JS4B.js} +15 -15
- package/dist/{tokens-2NKS4KAO.js → tokens-TKLSP3OQ.js} +2 -2
- package/dist/{transcribe-63XQBLF3.js → transcribe-PODOCWCC.js} +8 -8
- package/dist/{transcribe-AHNMYPY4.js → transcribe-XOPMHJLJ.js} +14 -14
- package/dist/{updateCheck-XDYXIVKF.js → updateCheck-RO6FPYMZ.js} +2 -2
- package/dist/{upgrade-GK2RSMPV.js → upgrade-EVNIL5TZ.js} +2 -2
- package/dist/{urlDownloader-X2B7NQSQ.js → urlDownloader-F5HYFRA6.js} +4 -4
- package/dist/{validate-UN4RB6KN.js → validate-NXLFCHGG.js} +20 -20
- package/dist/{video-QRWQLU5O.js → video-ECV2OIQN.js} +5 -5
- package/dist/warmCheck.js +33 -33
- package/package.json +1 -1
- package/dist/chunk-42DLVZNO.js +0 -3983
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
EncoderInterruptedError,
|
|
17
17
|
encoderFailureError,
|
|
18
18
|
prepareAnimatedGifInputs
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-TNOERLC6.js";
|
|
20
20
|
import {
|
|
21
21
|
parseEncoderOptions
|
|
22
22
|
} from "./chunk-KLIKCX6Q.js";
|
|
@@ -162,7 +162,7 @@ import {
|
|
|
162
162
|
verifyDiskDrawElementSamples,
|
|
163
163
|
videoAudioId,
|
|
164
164
|
writeCapturedFrame
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-Y63CT2ZC.js";
|
|
166
166
|
import {
|
|
167
167
|
DISTRIBUTED_FPS,
|
|
168
168
|
HF_VFX_ATTR,
|
|
@@ -178,7 +178,7 @@ import {
|
|
|
178
178
|
parseVfxChain,
|
|
179
179
|
resolveAuthoredTimingWindow,
|
|
180
180
|
toFps
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-65VFH2UV.js";
|
|
182
182
|
import {
|
|
183
183
|
assignBundledRuntimeCompositionIds,
|
|
184
184
|
buildVariablesByCompScript,
|
|
@@ -190,7 +190,7 @@ import {
|
|
|
190
190
|
inlineSubCompositions,
|
|
191
191
|
parsesAsScript,
|
|
192
192
|
prepareFlattenedInnerRoot
|
|
193
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-WMCGD4XL.js";
|
|
194
194
|
import {
|
|
195
195
|
COMPOSITION_SOURCE_URL,
|
|
196
196
|
HF_COLOR_GRADING_ATTR,
|
|
@@ -222,7 +222,7 @@ import {
|
|
|
222
222
|
sourceTimeAt,
|
|
223
223
|
styleElementsFor,
|
|
224
224
|
timeAtSourceTime
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-YRQPU7SV.js";
|
|
226
226
|
import {
|
|
227
227
|
CANVAS_DIMENSIONS,
|
|
228
228
|
HTML_BODY_CSS_HEIGHT_FIRST_RE,
|
|
@@ -1468,6 +1468,7 @@ function buildRenderErrorDetails(input) {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
|
|
1470
1470
|
// ../producer/src/services/render/renderEventPublisher.ts
|
|
1471
|
+
var FLUSH_TIMEOUT_MS = 1e4;
|
|
1471
1472
|
function snapshotJob(job) {
|
|
1472
1473
|
return {
|
|
1473
1474
|
...job,
|
|
@@ -1497,7 +1498,15 @@ var OrderedRenderEventPublisher = class {
|
|
|
1497
1498
|
});
|
|
1498
1499
|
}
|
|
1499
1500
|
async flush() {
|
|
1500
|
-
|
|
1501
|
+
let timer;
|
|
1502
|
+
const drained = await Promise.race([
|
|
1503
|
+
this.tail.then(() => true),
|
|
1504
|
+
new Promise((resolve11) => {
|
|
1505
|
+
timer = setTimeout(() => resolve11(false), FLUSH_TIMEOUT_MS);
|
|
1506
|
+
})
|
|
1507
|
+
]);
|
|
1508
|
+
clearTimeout(timer);
|
|
1509
|
+
if (!drained) this.log.warn("Render event sink did not drain; continuing without it");
|
|
1501
1510
|
}
|
|
1502
1511
|
};
|
|
1503
1512
|
function publishRenderFailure(job, failure, onProgress) {
|
|
@@ -5442,6 +5451,56 @@ function heartbeatTargetMs(index) {
|
|
|
5442
5451
|
const overflow = index - HEARTBEAT_RAMP_MS.length + 1;
|
|
5443
5452
|
return HEARTBEAT_RAMP_END_MS + overflow * HEARTBEAT_REPEAT_MS;
|
|
5444
5453
|
}
|
|
5454
|
+
var RenderStageStalledError = class extends CaptureFailure {
|
|
5455
|
+
code = "RENDER_STAGE_STALLED";
|
|
5456
|
+
owner = "system";
|
|
5457
|
+
retryable = false;
|
|
5458
|
+
constructor(phase, silentMs, progress) {
|
|
5459
|
+
super({
|
|
5460
|
+
kind: "protocol_timeout",
|
|
5461
|
+
message: `[Render] ${phase} stalled: no progress for ${silentMs}ms (stuck at ${progress}).`
|
|
5462
|
+
});
|
|
5463
|
+
this.name = "RenderStageStalledError";
|
|
5464
|
+
}
|
|
5465
|
+
};
|
|
5466
|
+
var STALL_POLL_MS = 5e3;
|
|
5467
|
+
function watchStall(phase, rule) {
|
|
5468
|
+
let last = rule.progress();
|
|
5469
|
+
let budgetMs = rule.firstProgressMs;
|
|
5470
|
+
let lastChangeAt = Date.now();
|
|
5471
|
+
let attempt;
|
|
5472
|
+
let timer;
|
|
5473
|
+
const restartWindow = (ms) => {
|
|
5474
|
+
last = rule.progress();
|
|
5475
|
+
budgetMs = ms;
|
|
5476
|
+
lastChangeAt = Date.now();
|
|
5477
|
+
};
|
|
5478
|
+
const tripped = new Promise((_, reject) => {
|
|
5479
|
+
timer = setInterval(
|
|
5480
|
+
() => {
|
|
5481
|
+
const current = rule.progress();
|
|
5482
|
+
if (current !== last) return restartWindow(rule.noProgressMs);
|
|
5483
|
+
if (Date.now() - lastChangeAt < budgetMs) return;
|
|
5484
|
+
const error = new RenderStageStalledError(phase, budgetMs, current);
|
|
5485
|
+
if (attempt && !attempt.signal.aborted) {
|
|
5486
|
+
attempt.abort(error);
|
|
5487
|
+
return restartWindow(rule.noProgressMs);
|
|
5488
|
+
}
|
|
5489
|
+
clearInterval(timer);
|
|
5490
|
+
reject(error);
|
|
5491
|
+
},
|
|
5492
|
+
Math.min(STALL_POLL_MS, rule.noProgressMs, rule.firstProgressMs)
|
|
5493
|
+
);
|
|
5494
|
+
});
|
|
5495
|
+
const openAttempt = (parent) => {
|
|
5496
|
+
attempt = new AbortController();
|
|
5497
|
+
restartWindow(rule.firstProgressMs);
|
|
5498
|
+
return parent ? AbortSignal.any([parent, attempt.signal]) : attempt.signal;
|
|
5499
|
+
};
|
|
5500
|
+
const stalledBy = () => attempt?.signal.aborted ? attempt.signal.reason : void 0;
|
|
5501
|
+
return { tripped, openAttempt, stalledBy, stop: () => clearInterval(timer) };
|
|
5502
|
+
}
|
|
5503
|
+
var openUnwatchedAttempt = (parent) => parent ?? new AbortController().signal;
|
|
5445
5504
|
async function observeRenderStage(recorder, phase, data, fn, options = {}) {
|
|
5446
5505
|
const heartbeatMessage = options.heartbeatMessage ?? "stage still running";
|
|
5447
5506
|
const startedAt = recorder.stageStart(phase, data);
|
|
@@ -5463,15 +5522,19 @@ async function observeRenderStage(recorder, phase, data, fn, options = {}) {
|
|
|
5463
5522
|
heartbeatTimer.unref?.();
|
|
5464
5523
|
};
|
|
5465
5524
|
scheduleNextHeartbeat();
|
|
5525
|
+
const stall = options.stall ? watchStall(phase, options.stall) : void 0;
|
|
5466
5526
|
const clearHeartbeats = () => {
|
|
5467
5527
|
clearTimeout(heartbeatTimer);
|
|
5528
|
+
stall?.stop();
|
|
5468
5529
|
};
|
|
5469
5530
|
try {
|
|
5470
|
-
const
|
|
5531
|
+
const run = fn(stall?.openAttempt ?? openUnwatchedAttempt);
|
|
5532
|
+
const result = await (stall ? Promise.race([run, stall.tripped]) : run);
|
|
5471
5533
|
clearHeartbeats();
|
|
5472
5534
|
recorder.stageEnd(phase, startedAt, data);
|
|
5473
5535
|
return result;
|
|
5474
|
-
} catch (
|
|
5536
|
+
} catch (caught) {
|
|
5537
|
+
const error = stall?.stalledBy() ?? caught;
|
|
5475
5538
|
clearHeartbeats();
|
|
5476
5539
|
recorder.stageError(phase, startedAt, error, data);
|
|
5477
5540
|
throw error;
|
|
@@ -7209,9 +7272,10 @@ async function discoverMediaFromBrowser(page) {
|
|
|
7209
7272
|
const tagName = isImage ? "image" : htmlEl.tagName.toLowerCase() === "video" ? "video" : "audio";
|
|
7210
7273
|
const id = htmlEl.getAttribute("data-hf-render-id") || htmlEl.id || (isImage ? autoImageIds.get(htmlEl) : void 0);
|
|
7211
7274
|
if (!id) return;
|
|
7212
|
-
const
|
|
7213
|
-
const
|
|
7214
|
-
const
|
|
7275
|
+
const resolvedSrc = htmlEl.currentSrc || htmlEl.src || htmlEl.getAttribute("src") || "";
|
|
7276
|
+
const withoutQueryAndHash = (url) => url.replace(/[?#][\s\S]*$/, "");
|
|
7277
|
+
const isPageItself = withoutQueryAndHash(resolvedSrc) === withoutQueryAndHash(location.href);
|
|
7278
|
+
const src = isPageItself ? "" : resolvedSrc;
|
|
7215
7279
|
const start = parseFloat(htmlEl.getAttribute("data-start") || "0");
|
|
7216
7280
|
const endRaw = htmlEl.getAttribute("data-end");
|
|
7217
7281
|
const durationRaw = htmlEl.getAttribute("data-duration");
|
|
@@ -9432,6 +9496,7 @@ async function runCaptureStage(input) {
|
|
|
9432
9496
|
interleaveFrames: input.interleaveFrames,
|
|
9433
9497
|
dedupPerfs,
|
|
9434
9498
|
pageErrorLines: workerPageErrors,
|
|
9499
|
+
openAttempt: input.openAttempt,
|
|
9435
9500
|
onProgress: (progress) => {
|
|
9436
9501
|
if (progress.latestWorkerPhase) {
|
|
9437
9502
|
if (progress.capturedFrames === 0) reportWorkerStartup(job, progress, onProgress);
|
|
@@ -9503,6 +9568,11 @@ async function runSequentialDiskCapture(input, captureOptions, captureCfg, check
|
|
|
9503
9568
|
let transientRetriesUsed = 0;
|
|
9504
9569
|
let resumeFrom = 0;
|
|
9505
9570
|
while (true) {
|
|
9571
|
+
const attempt = input.openAttempt?.();
|
|
9572
|
+
const assertAttemptActive = () => {
|
|
9573
|
+
assertNotAborted();
|
|
9574
|
+
attempt?.throwIfAborted();
|
|
9575
|
+
};
|
|
9506
9576
|
const videoInjector = createRenderVideoFrameInjector();
|
|
9507
9577
|
const session = probeSession ?? await createCaptureSession(
|
|
9508
9578
|
fileServer.url,
|
|
@@ -9518,10 +9588,10 @@ async function runSequentialDiskCapture(input, captureOptions, captureCfg, check
|
|
|
9518
9588
|
probeSession = null;
|
|
9519
9589
|
}
|
|
9520
9590
|
await ensureSessionReady(session);
|
|
9521
|
-
|
|
9591
|
+
assertAttemptActive();
|
|
9522
9592
|
lastBrowserConsole = session.browserConsoleBuffer;
|
|
9523
9593
|
await captureSessionFrames(session, {
|
|
9524
|
-
input,
|
|
9594
|
+
input: { ...input, assertNotAborted: assertAttemptActive },
|
|
9525
9595
|
rangeStart,
|
|
9526
9596
|
rangeEnd,
|
|
9527
9597
|
resumeFrom,
|
|
@@ -11342,7 +11412,17 @@ function captureAttemptMadeProgress(attemptTargetFrameCount, remainingFrameCount
|
|
|
11342
11412
|
function resetCaptureAttemptProgress(job) {
|
|
11343
11413
|
job.framesRendered = 0;
|
|
11344
11414
|
}
|
|
11415
|
+
var FIRST_FRAME_STALL_MS = 3e5;
|
|
11416
|
+
function frameStallRule(job) {
|
|
11417
|
+
const noProgressMs = resolveCaptureStallTimeoutMs();
|
|
11418
|
+
return {
|
|
11419
|
+
progress: () => job.framesRendered ?? 0,
|
|
11420
|
+
noProgressMs,
|
|
11421
|
+
firstProgressMs: Math.max(FIRST_FRAME_STALL_MS, noProgressMs)
|
|
11422
|
+
};
|
|
11423
|
+
}
|
|
11345
11424
|
function isRecoverableParallelCaptureError(error) {
|
|
11425
|
+
if (error instanceof RenderStageStalledError) return true;
|
|
11346
11426
|
const message = normalizeErrorMessage(error);
|
|
11347
11427
|
if (!message.includes("[Parallel] Capture failed")) return false;
|
|
11348
11428
|
const kind = classifyCaptureFailure(error).kind;
|
|
@@ -11405,8 +11485,10 @@ async function executeDiskCaptureWithAdaptiveRetry(options) {
|
|
|
11405
11485
|
)
|
|
11406
11486
|
];
|
|
11407
11487
|
options.dedupPerfs.length = 0;
|
|
11488
|
+
let attemptSignal = options.abortSignal;
|
|
11408
11489
|
try {
|
|
11409
11490
|
for (const tasks of batches) {
|
|
11491
|
+
attemptSignal = options.openAttempt?.(options.abortSignal) ?? options.abortSignal;
|
|
11410
11492
|
const capturedBeforeBatch = countCapturedFrames(
|
|
11411
11493
|
options.totalFrames,
|
|
11412
11494
|
options.framesDir,
|
|
@@ -11419,7 +11501,7 @@ async function executeDiskCaptureWithAdaptiveRetry(options) {
|
|
|
11419
11501
|
tasks,
|
|
11420
11502
|
options.captureOptions,
|
|
11421
11503
|
options.createBeforeCaptureHook,
|
|
11422
|
-
|
|
11504
|
+
attemptSignal,
|
|
11423
11505
|
options.onProgress ? (progress) => {
|
|
11424
11506
|
options.onProgress?.({
|
|
11425
11507
|
...progress,
|
|
@@ -11467,7 +11549,8 @@ async function executeDiskCaptureWithAdaptiveRetry(options) {
|
|
|
11467
11549
|
currentWorkers = nextWorkers;
|
|
11468
11550
|
missingRanges = remaining;
|
|
11469
11551
|
attempt++;
|
|
11470
|
-
} catch (
|
|
11552
|
+
} catch (caught) {
|
|
11553
|
+
const error = attemptSignal?.aborted && !options.abortSignal?.aborted ? attemptSignal.reason : caught;
|
|
11471
11554
|
const failure = classifyCaptureFailure(error, { signal: options.abortSignal });
|
|
11472
11555
|
if (failure.kind === "cancelled") {
|
|
11473
11556
|
throw error;
|
|
@@ -13136,37 +13219,44 @@ async function executeRenderPipeline(input) {
|
|
|
13136
13219
|
observability,
|
|
13137
13220
|
"capture_hdr_layered",
|
|
13138
13221
|
captureStageObservationData({ hasHdrContent }),
|
|
13139
|
-
() =>
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
13159
|
-
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
|
|
13222
|
+
(openAttempt) => {
|
|
13223
|
+
const attempt = openAttempt(executionSignal);
|
|
13224
|
+
return runCaptureHdrStage({
|
|
13225
|
+
job,
|
|
13226
|
+
cfg,
|
|
13227
|
+
plan: layeredPlan,
|
|
13228
|
+
log,
|
|
13229
|
+
projectDir,
|
|
13230
|
+
compiledDir,
|
|
13231
|
+
framesDir,
|
|
13232
|
+
videoOnlyPath,
|
|
13233
|
+
width,
|
|
13234
|
+
height,
|
|
13235
|
+
totalFrames,
|
|
13236
|
+
composition,
|
|
13237
|
+
hasHdrContent,
|
|
13238
|
+
effectiveHdr,
|
|
13239
|
+
nativeHdrVideoIds,
|
|
13240
|
+
nativeHdrImageIds,
|
|
13241
|
+
videoTransfers,
|
|
13242
|
+
imageTransfers,
|
|
13243
|
+
hdrImageSrcPaths,
|
|
13244
|
+
preset,
|
|
13245
|
+
effectiveQuality,
|
|
13246
|
+
effectiveBitrate,
|
|
13247
|
+
fileServer: activeFileServer,
|
|
13248
|
+
buildCaptureOptions,
|
|
13249
|
+
createRenderVideoFrameInjector,
|
|
13250
|
+
hdrDiagnostics,
|
|
13251
|
+
abortSignal: attempt,
|
|
13252
|
+
assertNotAborted: () => {
|
|
13253
|
+
assertNotAborted();
|
|
13254
|
+
attempt.throwIfAborted();
|
|
13255
|
+
},
|
|
13256
|
+
onProgress
|
|
13257
|
+
});
|
|
13258
|
+
},
|
|
13259
|
+
{ stall: frameStallRule(job) }
|
|
13170
13260
|
);
|
|
13171
13261
|
lastBrowserConsole = hdrRes.lastBrowserConsole;
|
|
13172
13262
|
layeredCaptureWarnings.push(...hdrRes.warnings);
|
|
@@ -13531,7 +13621,7 @@ async function executeRenderPipeline(input) {
|
|
|
13531
13621
|
observability,
|
|
13532
13622
|
"capture_disk",
|
|
13533
13623
|
captureStageObservationData({ needsAlpha: diskPlan.needsAlpha }),
|
|
13534
|
-
() => runCaptureStage({
|
|
13624
|
+
(openAttempt) => runCaptureStage({
|
|
13535
13625
|
fileServer: activeFileServer,
|
|
13536
13626
|
workDir,
|
|
13537
13627
|
framesDir,
|
|
@@ -13549,8 +13639,10 @@ async function executeRenderPipeline(input) {
|
|
|
13549
13639
|
assertNotAborted,
|
|
13550
13640
|
onProgress,
|
|
13551
13641
|
onFrameLanded: (frame) => overlap?.onFrameLanded(frame),
|
|
13552
|
-
interleaveFrames: overlap !== null
|
|
13553
|
-
|
|
13642
|
+
interleaveFrames: overlap !== null,
|
|
13643
|
+
openAttempt
|
|
13644
|
+
}),
|
|
13645
|
+
{ stall: frameStallRule(job) }
|
|
13554
13646
|
);
|
|
13555
13647
|
let captureRes;
|
|
13556
13648
|
try {
|
|
@@ -16070,7 +16162,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
|
|
|
16070
16162
|
if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
|
|
16071
16163
|
if (probeResult.probeSession) {
|
|
16072
16164
|
try {
|
|
16073
|
-
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-
|
|
16165
|
+
const { closeCaptureSession: closeCaptureSession2 } = await import("./src-OQRG6BT7.js");
|
|
16074
16166
|
await closeCaptureSession2(probeResult.probeSession);
|
|
16075
16167
|
} catch (err) {
|
|
16076
16168
|
log.warn("[plan] probe session close failed", {
|
|
@@ -17127,6 +17219,7 @@ function resolveWorkerEntry2() {
|
|
|
17127
17219
|
|
|
17128
17220
|
// ../producer/src/server.ts
|
|
17129
17221
|
var DEFAULT_SERVER_FPS = { num: 30, den: 1 };
|
|
17222
|
+
var SSE_KEEPALIVE_MS = 3e4;
|
|
17130
17223
|
var SAFE_RENDER_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
17131
17224
|
"ASSET_MEDIA_TYPE_MISMATCH",
|
|
17132
17225
|
"NOT_MEDIA_PAYLOAD",
|
|
@@ -17134,7 +17227,8 @@ var SAFE_RENDER_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
|
17134
17227
|
"VIDEO_SOURCE_UNRENDERABLE",
|
|
17135
17228
|
"VIDEO_EXTRACTION_FAILED",
|
|
17136
17229
|
"ENCODER_INTERRUPTED",
|
|
17137
|
-
"RENDER_TOO_SLOW"
|
|
17230
|
+
"RENDER_TOO_SLOW",
|
|
17231
|
+
"RENDER_STAGE_STALLED"
|
|
17138
17232
|
]);
|
|
17139
17233
|
function extractSafeRenderErrorCode(error) {
|
|
17140
17234
|
if (typeof error !== "object" || error === null || !("code" in error)) return void 0;
|
|
@@ -17648,15 +17742,21 @@ function createRenderHandlers(options = {}) {
|
|
|
17648
17742
|
})
|
|
17649
17743
|
});
|
|
17650
17744
|
}
|
|
17745
|
+
const reportProgress = createSseProgressReporter(stream, requestId);
|
|
17746
|
+
const keepalive = setInterval(() => {
|
|
17747
|
+
Promise.resolve(reportProgress(job, job.currentStage)).catch(() => {
|
|
17748
|
+
});
|
|
17749
|
+
}, SSE_KEEPALIVE_MS);
|
|
17651
17750
|
const release = await renderSemaphore.acquire();
|
|
17652
17751
|
try {
|
|
17653
17752
|
await executeRenderJob(
|
|
17654
17753
|
job,
|
|
17655
17754
|
input.projectDir,
|
|
17656
17755
|
absoluteOutputPath,
|
|
17657
|
-
|
|
17756
|
+
reportProgress,
|
|
17658
17757
|
abortController.signal
|
|
17659
|
-
);
|
|
17758
|
+
).finally(release);
|
|
17759
|
+
clearInterval(keepalive);
|
|
17660
17760
|
const fileSize = outputFileSize(absoluteOutputPath);
|
|
17661
17761
|
const outputToken = store.register(absoluteOutputPath);
|
|
17662
17762
|
const outputUrl = `${outputUrlPrefix}/${outputToken}`;
|
|
@@ -17676,6 +17776,7 @@ function createRenderHandlers(options = {}) {
|
|
|
17676
17776
|
})
|
|
17677
17777
|
});
|
|
17678
17778
|
} catch (error) {
|
|
17779
|
+
clearInterval(keepalive);
|
|
17679
17780
|
await writeRenderStreamFailure({
|
|
17680
17781
|
error,
|
|
17681
17782
|
job,
|
|
@@ -17685,7 +17786,6 @@ function createRenderHandlers(options = {}) {
|
|
|
17685
17786
|
log
|
|
17686
17787
|
});
|
|
17687
17788
|
} finally {
|
|
17688
|
-
release();
|
|
17689
17789
|
c.req.raw.signal.removeEventListener("abort", onRequestAbort);
|
|
17690
17790
|
cleanupTempDir(cleanupProjectDir, log);
|
|
17691
17791
|
}
|
|
@@ -17744,7 +17844,7 @@ function startServer(options = {}) {
|
|
|
17744
17844
|
});
|
|
17745
17845
|
async function shutdown(signal) {
|
|
17746
17846
|
log.info(`Received ${signal}, shutting down`);
|
|
17747
|
-
const { drainBrowserPool } = await import("./src-
|
|
17847
|
+
const { drainBrowserPool } = await import("./src-OQRG6BT7.js");
|
|
17748
17848
|
await drainBrowserPool().catch(() => {
|
|
17749
17849
|
});
|
|
17750
17850
|
const handle = await Promise.race([
|
|
@@ -19458,29 +19558,36 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
|
|
|
19458
19558
|
const captureSession = session;
|
|
19459
19559
|
session = null;
|
|
19460
19560
|
overlap.current = canEncodeWhileCapturing(encodeInput, chunkWorkerCount, cpus3().length) ? encodeWhileCapturing(encodeInput, framesInChunk) : null;
|
|
19461
|
-
await
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
|
|
19466
|
-
|
|
19467
|
-
|
|
19468
|
-
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
|
|
19472
|
-
|
|
19473
|
-
|
|
19474
|
-
|
|
19475
|
-
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19561
|
+
await observeRenderStage(
|
|
19562
|
+
new RenderObservabilityRecorder({ pipelineStartMs: start, log }),
|
|
19563
|
+
"capture_chunk",
|
|
19564
|
+
{ chunkIndex },
|
|
19565
|
+
(openAttempt) => runCaptureStage({
|
|
19566
|
+
fileServer,
|
|
19567
|
+
workDir,
|
|
19568
|
+
framesDir,
|
|
19569
|
+
job,
|
|
19570
|
+
totalFrames: framesInChunk,
|
|
19571
|
+
cfg: captureCfg,
|
|
19572
|
+
plan: capturePlan,
|
|
19573
|
+
log,
|
|
19574
|
+
probeSession: captureSession,
|
|
19575
|
+
captureAttempts,
|
|
19576
|
+
// This sink records each worker's effective capture mode so a
|
|
19577
|
+
// fallback remains observable to adapters and smoke tests.
|
|
19578
|
+
dedupPerfs: capturePerfs,
|
|
19579
|
+
buildCaptureOptions: () => captureOptions,
|
|
19580
|
+
createRenderVideoFrameInjector: createChunkVideoFrameInjector,
|
|
19581
|
+
abortSignal: void 0,
|
|
19582
|
+
assertNotAborted: () => {
|
|
19583
|
+
},
|
|
19584
|
+
frameRange: range,
|
|
19585
|
+
onFrameLanded: (frame) => overlap.current?.onFrameLanded(frame),
|
|
19586
|
+
interleaveFrames: interleavesCapture(overlap.current !== null, options),
|
|
19587
|
+
openAttempt
|
|
19588
|
+
}),
|
|
19589
|
+
{ stall: frameStallRule(job) }
|
|
19590
|
+
).catch(async (captureError) => {
|
|
19484
19591
|
await overlap.current?.abort();
|
|
19485
19592
|
overlap.current = null;
|
|
19486
19593
|
throw captureError;
|