mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
* fix(engine): disable browser pool for parallel capture in BeginFrame mode BeginFrame's compositor is process-global — when multiple pages in the same Chrome instance drive HeadlessExperimental.beginFrame concurrently, they race the compositor and crash with "Protocol error: Target closed". Only disable the pool when BeginFrame mode would actually be active (Linux + headless-shell + not forceScreenshot). Screenshot mode (macOS/Windows) is unaffected and keeps the pool for memory efficiency. Also extracts the frame capture loop into captureFrameRange to reduce function complexity in executeWorkerTask. * fix(engine): include supersampling in BeginFrame-mode predicate Match the full capture-mode predicate from createCaptureSession: DPR > 1 (supersampling) forces screenshot mode, which is pool-safe. Without this check, supersampled parallel renders on Linux would unnecessarily launch separate browsers.