Skip to content

Add Firefox support and native BiDi screen recording - #307

Merged
hugs merged 10 commits into
VibiumDev:mainfrom
vincebln2:feat/firefox-support
Aug 7, 2026
Merged

Add Firefox support and native BiDi screen recording#307
hugs merged 10 commits into
VibiumDev:mainfrom
vincebln2:feat/firefox-support

Conversation

@vincebln2

@vincebln2 vincebln2 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add Firefox support across the CLI, daemon, MCP, and JavaScript, Python, and Java
    clients.
  • Support Firefox release/beta installation and engine selection through API options, CLI
    flags, and environment variables.
  • Add native WebDriver BiDi screencast recording for JavaScript and Python.
  • Add focused Firefox CI coverage while retaining Chrome as the complete-suite default.

Current limitations

Firefox dialog and network interception support remain follow-up work. Java can launch Firefox but does not yet expose screencast APIs. Audio recording depends on future Firefox BiDi support.

Firefox 154 is currently required for screencasting, so CI temporarily uses the beta channel.

Testing

CI covers Firefox installation, launch, core CLI behavior, screenshots, channel isolation, screencasting, cleanup, and retry behavior. The full Chrome suite remains green.

Closes #308
Closes #309

Firefox speaks WebDriver BiDi natively, so vibium launches it directly
with --remote-debugging-port and session.new over the WebSocket. No
geckodriver. 'vibium install --engine firefox' downloads Firefox from
Mozilla's release archive into the cache (macOS DMG, Linux tar.xz;
Windows has no archive build, use VIBIUM_FIREFOX_PATH).

Engine selection follows what Playwright and Selenium users expect:
CLI --engine flag and VIBIUM_ENGINE env var, firefox.start() named
launchers in the JS and Python clients next to the engine option,
StartOptions.engine in Java, and an engine argument on the MCP
browser_start tool. VIBIUM_ENGINE sets the default inside the binary,
so an unchanged test suite runs on Firefox via VIBIUM_ENGINE=firefox.

VIBIUM_FIREFOX_CHANNEL=beta installs the beta channel, for features
that have not reached stable yet.

LaunchResult.ChromedriverCmd is renamed to BrowserCmd since it now
also holds the Firefox process. The orphan sweep gains a Firefox
counterpart anchored to the Firefox cache dir.
WebDriver BiDi now specifies browsingContext.startScreencast and
stopScreencast: the browser encodes video itself and writes a file.
Firefox ships this in 154 (beta now, stable 2026-08-18). Chrome has
not implemented it yet.

New engine commands vibium:screencast.start/stop wrap the BiDi pair,
track the recording on the session, and on stop move the browser-
written file to the caller's path or return it base64. Abandoned
recordings are removed on session close (the spec leaves file cleanup
to the local end).

Clients expose page.screencast.start()/stop() in JS and Python, async
and sync. The API is identical on every engine; on engines without
support start() fails immediately with an error that names the fix
instead of the browser's raw "unknown command".

The screencast e2e tests self-skip on Firefox <154, so they activate
on their own once 154 reaches the release channel.
Add --firefox-channel and a client channel option so the beta that
screencast needs can be selected from code, not just the env var.

CI installs Firefox beta and sets VIBIUM_REQUIRE_FIREFOX so the
Firefox tests fail instead of silently skipping; before this the
green check never exercised Firefox at all. Drop the job-wide beta
channel once 154 reaches stable on 2026-08-18.

Keep screencast state on a failed stop so stop can be retried; a
retried stop skips straight to delivery, and session cleanup still
deletes the file. New tests cover delivery retry and per-channel
cache isolation.
@vincebln2 vincebln2 changed the title Feat/firefox support Add Firefox support and native BiDi screen recording Aug 7, 2026
Comment thread docs/reference/api.md

---

**Total: 150 commands**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

including totals is one of those quirks that AI loves to include. but they're frequently wrong and quickly get out of date. when i've noticed totals lately, i'm more included to remove them completely than burn tokens to get an accurate count in a static doc. not a blocker for this pr... but i might delete this line completely in a later commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add video recording via BiDi screencast Add Firefox support

2 participants