Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

WiP: Video capture #1234

Closed
wants to merge 1 commit into from
Closed

WiP: Video capture #1234

wants to merge 1 commit into from

Conversation

pablochacin
Copy link

@pablochacin pablochacin commented Mar 5, 2024

What?

Implements a video recording API for the browser using the screencast API to capture screens and ffmpeg for converting them into a video (similar approach used by puppeteer's screen recorder)

The functionality to start recording a video is added to the page interface. As it is not possible to have more than one active recording at a time, it was decided not to return a screenrecorder object as in the puppeter's API , but leave the functionality to control the active recording (basically, stop the recording) in the page object itself. Addopting pupperter's model would be relatively simple.

Why?

  • Capture what the end-user experience is like
  • Help debug flaky tests that fail due to unforeseen changes in the page under test

Todo

  • Fix: output directed from ffmpef to the file persister is truncated
  • Ensure video is recorded if the page is closed
  • Review API (method names, etc)
  • Add tests
  • [ ] Review style
  • Document
  • Add Examples

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Closes grafana/k6#4487

Signed-off-by: Pablo Chacin <pablochacin@gmail.com>
@pablochacin pablochacin requested a review from a team as a code owner December 9, 2024 09:01
@pablochacin pablochacin requested review from mstoykov and ankur22 and removed request for a team December 9, 2024 09:01
@ankur22 ankur22 marked this pull request as draft December 11, 2024 11:07
@inancgumus inancgumus closed this Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Video API to support video capture/recording of test
2 participants