Record silent WebM screen video instead of GIF during recordings
...
The recorder now captures continuous screencast frames via the CDP
screencast API and encodes them into a silent WebM (VP8, ~15 fps, capped
at 800px wide) uploaded as recording.webm. WebCodecs VideoEncoder is not
exposed to service workers, so encoding runs in an offscreen document
(chrome.offscreen) fed by base64 frame batches over a runtime port; the
result is verified with a local <video> playback probe and falls back to
the cursor-following GIF when encoding or verification fails (Firefox,
old Chrome, broken output).
Root cause of the earlier corrupt output: webm-muxer silently produces a
broken file when the first chunk's timestamp is non-zero — media
timestamps now start at the first frame and the muxer uses
firstTimestampBehavior: "offset".
The e2e now validates the uploaded recording with ffprobe (vp8 codec,
positive duration) and still covers the GIF fallback path, console-step
dump, navigation survival and replay.
Co-Authored-By: Claude Code <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
21 hours ago