fix(engine): use domcontentloaded to avoid video preload navigation timeout (#1239)

Page.goto with waitUntil:'load' blocks until all video sources finish
preloading metadata. With 6+ video sources (8–21s each), this reliably
exceeds the 60s navigation timeout, causing renders to hang at
'Initializing calibration session...' on M4 and other Apple Silicon macs.

Switch to waitUntil:'domcontentloaded' so navigation resolves as soon as
the DOM is ready, without gating on video media loading.

Fixes #1231
This commit is contained in:
Miguel Ángel
2026-06-06 16:04:04 -04:00
committed by GitHub
parent 272f731a67
commit 62b7137e72
+3 -1
View File
@@ -284,8 +284,10 @@ async function captureParitySide(
): Promise<{ buffer: Buffer; styles: Record<string, unknown> }> {
const page = await browser.newPage();
try {
// Use domcontentloaded to avoid blocking on video media preloading, which
// can exceed the navigation timeout for compositions with many video sources.
await page.goto(url, {
waitUntil: "load",
waitUntil: "domcontentloaded",
timeout: 60_000,
});
await waitForParityReady(page);