Add Firefox support and native BiDi screen recording - #307
Merged
Conversation
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.
hugs
reviewed
Aug 7, 2026
|
|
||
| --- | ||
|
|
||
| **Total: 150 commands** |
Contributor
There was a problem hiding this comment.
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.
This was referenced Aug 7, 2026
This was referenced Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
clients.
flags, and environment variables.
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