feat(runtime): render media treatments deterministically

This commit is contained in:
ukimsanov
2026-07-24 11:17:22 -07:00
parent 7778c093b6
commit 944640c328
13 changed files with 2994 additions and 309 deletions
@@ -2356,6 +2356,14 @@ async function prepareFrameForCapture(
if (session.onBeforeCapture) {
await session.onBeforeCapture(page, quantizedTime);
}
await page.evaluate(async () => {
const runtime = (
window as Window & {
__hf?: { colorGrading?: { waitForActiveLuts?: () => Promise<number> } };
}
).__hf?.colorGrading;
await runtime?.waitForActiveLuts?.();
});
const beforeCaptureMs = Date.now() - beforeCaptureStart;
// Page-side compositing three-phase protocol: