Fix video export crashing Chrome by using deterministic frame capture

Replace realtime captureStream(60) with manual captureStream(0) +
requestFrame at 30fps, suspend the live render loop during export,
prefer VP8, and cap bitrate to avoid STATUS_BREAKPOINT tab crashes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonxlnx
2026-06-10 00:46:24 +02:00
parent 1fc88c1c4e
commit b0a040fcd0
3 changed files with 89 additions and 30 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ Requires a browser with WebGL2 (Chrome, Edge, Firefox).
## Export
- **PNG** up to 3840×2160, rendered offscreen at full quality.
- **Video** (WebM VP9/VP8, MP4 where supported) recorded at 60 fps for 14 loops.
- **Video** (WebM VP8/VP9) rendered frame-by-frame at 30 fps for 14 loops. Uses manual canvas capture instead of realtime 60 fps streaming, which avoids browser crashes on heavy WebGL shaders.
- **GIF** rendered deterministically frame by frame, encoded in-page with a dependency-free GIF89a encoder (median-cut palette + ordered dithering), infinite loop flag set.
## Files