PuppeteerScreenRecorder class is responsible for managing the video

const screenRecorderOptions = {
followNewTab: true,
fps: 15,
}
const savePath = "./test/demo.mp4";
const screenRecorder = new PuppeteerScreenRecorder(page, screenRecorderOptions);
await screenRecorder.start(savePath);
// some puppeteer action or test
await screenRecorder.stop()

Constructors

Methods

  • Returns string

    total duration of video

    getRecordDuration

    return the total duration of the video recorded,

    1. if this method is called before calling the stop method, it would be return the time till it has recorded.
    2. if this method is called after stop method, it would give the total time for recording
  • Returns Promise<boolean>

    indicate whether stop is completed correct or not, if true without any error else false.

    stop

    stop the video capturing session