mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-15 13:58:20 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user