PuppeteerScreenRecorder class is responsible for managing the video
const screenRecorderOptions = { followNewTab: true, fps: 25, } const savePath = "./test/demo.mp4"; const screenRecorder = new PuppeteerScreenRecorder(page, screenRecorderOptions); await screenRecorder.start(savePath); // some puppeteer action or test await screenRecorder.stop()
getRecordDuration
return the total duration of the video recorded,
total duration of video
start
Start the video capturing session
const savePath = './test/demo.mp4'; //.mp4 is required await recorder.start(savePath);
accepts a path string to store the video
PuppeteerScreenRecorder
startStream
Start the video capturing session in a stream
const stream = new PassThrough(); await recorder.startStream(stream);
stop
stop the video capturing session
indicate whether stop is completed correct or not, if true without any error else false.
Generated using TypeDoc
PuppeteerScreenRecorder class is responsible for managing the video
const screenRecorderOptions = { followNewTab: true, fps: 25, } const savePath = "./test/demo.mp4"; const screenRecorder = new PuppeteerScreenRecorder(page, screenRecorderOptions); await screenRecorder.start(savePath); // some puppeteer action or test await screenRecorder.stop()