Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiP: Video capture #1234

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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 #103

Signed-off-by: Pablo Chacin <pablochacin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Video API to support video capture/recording of test
1 participant