fix(api): migrate Screencast from events to onFrame callback#39714
Merged
pavelfeldman merged 1 commit intomicrosoft:mainfrom Mar 18, 2026
Merged
fix(api): migrate Screencast from events to onFrame callback#39714pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman merged 1 commit intomicrosoft:mainfrom
Conversation
yury-s
approved these changes
Mar 17, 2026
144777d to
59eae36
Compare
dgozman
approved these changes
Mar 18, 2026
docs/src/api/class-screencast.md
Outdated
|
|
||
| Maximum screencast frame dimensions. The output frame may be smaller to preserve the page aspect ratio. Defaults to 800×800. | ||
|
|
||
| ### option: Screencast.start.onFrame |
Contributor
There was a problem hiding this comment.
Why is this an option, and not a first argument?
docs/src/api/class-screencast.md
Outdated
| ### option: Screencast.start.onFrame | ||
| * since: v1.59 | ||
| * langs: js | ||
| - `onFrame` ?<[function]\([Buffer]\)> |
Contributor
There was a problem hiding this comment.
To show that it can be async:
Suggested change
| - `onFrame` ?<[function]\([Buffer]\)> | |
| - `onFrame` <[function]\([Buffer]\): [Promise<any>|any]> |
utils/generate_types/overrides.d.ts
Outdated
| } | ||
|
|
||
| export interface Screencast { | ||
| start(options?: { |
Contributor
There was a problem hiding this comment.
Since page.route() does not need an override, I hope this one doesn't need one either.
59eae36 to
2bdc7ea
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
yury-s
approved these changes
Mar 18, 2026
|
|
||
| async start(options: { maxSize?: { width: number, height: number } } = {}) { | ||
| async start(onFrame: (buffer: Buffer) => any, options: { maxSize?: { width: number, height: number } } = {}): Promise<DisposableStub> { | ||
| this._onFrame = onFrame; |
Contributor
Test results for "tests 1"5 flaky38809 passed, 845 skipped Merge workflow run. |
Contributor
Test results for "MCP"1 failed 5506 passed, 343 skipped Merge workflow run. |
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.
No description provided.