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>
1 parent ca5a8f3 commit 85ff162130844b6fe66e1da4b7bc467a5bcc9fab
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 18 hours ago
Showing 13 changed files
View
package-lock.json
View
packages/extension/e2e.mjs
View
packages/extension/manifest.template.json
View
packages/extension/package.json
View
packages/extension/scripts/build.mjs
View
packages/extension/src/background/index.ts
View
packages/extension/src/background/video.ts 0 → 100644
View
packages/extension/src/offscreen/main.ts 0 → 100644
View
packages/extension/src/offscreen/offscreen.html 0 → 100644
View
packages/extension/vite.config.ts
View
packages/web/src/pages/ReportPage.vue
View
server/app/routers/reports.py
View
server/app/storage.py