Skip to content

chore(bidi): scale screencast frames in the browser - #42926

Merged
Yury Semikhatsky (yury-s) merged 1 commit into
microsoft:mainfrom
hbenl:scale-screencast-frames
Sep 25, 2026
Merged

Yury Semikhatsky (yury-s) merged 1 commit into
microsoft:mainfrom
hbenl:scale-screencast-frames

Conversation

@hbenl

Copy link
Copy Markdown
Collaborator

Fixes "screencast.start delivers frames via onFrame callback" in library/screencast.spec.ts.
Note that this PR regresses the test "onFrame receives viewport size" in the same file: the onFrame callback receives the scaled image's dimensions instead of the viewport dimensions. But I think it's worth making this change anyway for the performance improvement of not sending unscaled images over the protocol.
In the long run we want to move away from using browsingContext.captureScreenshot for screencasts (see w3c/webdriver-bidi#1134), we'll make sure that this will also include the viewport dimensions.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:715 › should indicate current test status `@windows-latest-node22`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:827 › should update state on subsequent run `@windows-latest-node22`

52279 passed, 1255 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox

8750 passed, 1480 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the CI failures here.

🟢 The one failure is a pre-existing flake

[firefox] › mcp/annotate.spec.ts:446 on Windows fails regularly on main and unrelated PRs; this PR doesn't reach it.

Details

The only failing test in the latest report is an MCP test on mcp-windows-latest-firefox. The PR changes BiDi screencast scaling (bidiPage.ts, BiDi protocol types) and removes the BiDi-only getFFmpegVideoFilterArgs hook, so videoRecorder.ts for non-BiDi pages keeps the same pad/crop filter it used before. The MCP [firefox] project runs the stock Juggler Firefox, not BiDi, so none of the changed code is exercised differently.

Pre-existing flake / infra

Triaged by the Playwright bot - agent run

@yury-s
Yury Semikhatsky (yury-s) merged commit 3e79a31 into microsoft:main Sep 25, 2026
46 of 47 checks passed
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.

2 participants