Skip to content

feat(api): add annotate option for video and screencast#39783

Merged
pavelfeldman merged 2 commits intomicrosoft:mainfrom
pavelfeldman:video-annotate
Mar 20, 2026
Merged

feat(api): add annotate option for video and screencast#39783
pavelfeldman merged 2 commits intomicrosoft:mainfrom
pavelfeldman:video-annotate

Conversation

@pavelfeldman
Copy link
Member

Summary

  • Adds annotate option to recordVideo, Video.start(), and Screencast.start()
  • Highlights interacted elements and click points during recording
  • Configurable display duration via annotate.delay (default 500ms)

### option: Screencast.start.annotate
* since: v1.59
- `annotate` ?<[Object]>
- `delay` ?<[int]> How long each annotation is displayed in milliseconds. Defaults to `500`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's explain that all input actions are delayed by this amount - this came as a surprise while reading the code.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll follow up, want to add a test step there.

Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
Signed-off-by: Pavel Feldman <pavel.feldman@gmail.com>
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

stopForTracing(listener: ScreencastListener) {
this.stopScreencast(listener).catch(e => debugLogger.log('error', e));
this._frameThrottler.setThrottlingEnabled(false);
this.dispose();
Copy link
Member

Choose a reason for hiding this comment

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

this method can be called multiple times


Defaults to 800×800.

### option: Screencast.start.annotate
Copy link
Member

Choose a reason for hiding this comment

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

why is it on screencast? there were requests to see the actions in the running browser

@github-actions
Copy link
Contributor

Test results for "MCP"

5458 passed, 340 skipped


Merge workflow run.

@github-actions
Copy link
Contributor

Test results for "tests 1"

2 flaky ⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-library] › library/screencast.spec.ts:75 › start reuses existing screencast when video recording is running `@webkit-ubuntu-22.04-node20`

38812 passed, 845 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