mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
52fd9c2c9f
Re-review found the prior orphan-rejection fix attached to the wrong promise. - Unhandled-rejection guard moved to source: produceDrawElementFrame attaches a no-op .catch to every encodeResult at creation, covering the depth-2 loop's orphaned in-flight frame. Removed the ineffective loop-level prev.catch. - Per-frame encode watchdog (30s): a lost worker message no longer hangs the render to the protocol timeout (onerror->id=-1 only covered crashes). - Empty-frame guard: payload-less worker success rejects instead of resolving a 0-byte Buffer ffmpeg would write as a corrupt frame. - Worker reuses one OffscreenCanvas across frames (was per-frame alloc). - Close the ImageBitmap on the worker-missing reject path (GPU leak). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>