Skip to content

chore: screencast/tracing/video size conflicts - #39512

Merged
Yury Semikhatsky (yury-s) merged 7 commits into
microsoft:mainfrom
yury-s:video-screencast-size
Mar 5, 2026
Merged

chore: screencast/tracing/video size conflicts#39512
Yury Semikhatsky (yury-s) merged 7 commits into
microsoft:mainfrom
yury-s:video-screencast-size

Conversation

@yury-s

Copy link
Copy Markdown
Member

No description provided.

const size = params.size || this._page.emulatedSize()?.viewport || { width: 800, height: 600 };
// TODO: move to screencast and make startScrencast accept a listener.
this._screencastFrameListener = eventsHelper.addEventListener(this._page, Page.Events.ScreencastFrame, (frame: ScreencastFrame) => {
const { width, height } = jpegDimensions(frame.buffer);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Doesn't ScreencastFrame already contain width/height?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No. Those are original device width/height.

Comment thread packages/playwright-core/src/server/dispatchers/pageDispatcher.ts Outdated

async startScreencast(params: channels.PageStartScreencastParams, progress?: Progress): Promise<channels.PageStartScreencastResult> {
const size = validateVideoSize(params.size, this._page.emulatedSize()?.viewport);
if (this._screencastFrameListener)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why this change? I don't quite understand.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We don't want to send screencastframe events if screencast is disabled, there is new test that checks that. Previously if video started we'd start dispatching screencastframe events.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread packages/playwright-core/src/server/chromium/crPage.ts Outdated
Comment thread packages/playwright-core/src/server/chromium/crPage.ts
Comment thread packages/playwright-core/src/server/dispatchers/pageDispatcher.ts
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

3 failed
❌ [firefox] › mcp/http.spec.ts:210 › http transport browser lifecycle (persistent) @mcp-macos-15
❌ [firefox] › mcp/sse.spec.ts:160 › sse transport browser lifecycle (persistent) @mcp-macos-15
❌ [webkit] › mcp/http.spec.ts:210 › http transport browser lifecycle (persistent) @mcp-macos-15

5221 passed, 171 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [chromium-page] › page/page-request-continue.spec.ts:754 › propagate headers cross origin redirect after interception `@ubuntu-22.04-chromium-tip-of-tree`
⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-arm-node20`
⚠️ [firefox-library] › library/trace-viewer.spec.ts:1216 › should display language-specific locators `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/trace-viewer.spec.ts:2093 › should handle failed snapshots due to dialog `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:700 › should indicate current test status `@macos-latest-node20`

38798 passed, 841 skipped


Merge workflow run.

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.

3 participants