fix(screencast): plumb viewport size through onFrame callback - #40649
Conversation
Browsers already report deviceWidth/deviceHeight with each screencast frame. Forward them through the protocol event into the client onFrame callback so consumers do not need a separate viewport query (which can race with frame delivery and stall when the page is unresponsive). Use the new fields in the dashboard controller instead of calling page.viewportSize() inside onFrame. Fixes: microsoft#40625
0a5b0bb to
2a6c6ab
Compare
Test results for "MCP"6 failed 1 flaky6936 passed, 1052 skipped Merge workflow run. |
Test results for "tests 1"3 flaky41659 passed, 851 skipped Merge workflow run. |
| - `onFrame` <[function]\([Object]\): [Promise]> | ||
| - alias: ScreencastFrame | ||
| - `data` <[Buffer]> JPEG-encoded frame data. | ||
| - `viewportWidth` <[int]> Width of the page viewport at the time the frame was captured. |
There was a problem hiding this comment.
maybe viewport: Size ?
f6deb2f
into
microsoft:main
Summary
onFramecallback.page.viewportSize()inside the callback, removing a race that could stall the feed when the page is unresponsive.Fixes #40625