Feature request
page.screencast.start() can save a WebM recording and provide frame callbacks:
await page.screencast.start({
path: 'video.webm',
onFrame: ({ data, timestamp, viewportWidth, viewportHeight }) => {
// ...
},
})
Some consumers need only the frame timing metadata, particularly the timestamp of the first presented frame. They do not need the JPEG data.
A general use case is synchronizing a recorded browser video with an external timeline, such as test events, telemetry, captions, narration, annotations, or recordings from several pages.
Currently, using onFrame for synchronization also delivers the JPEG buffer for every frame. Ignoring data prevents application-level storage and decoding, but the buffer still travels through the callback path.
Would you consider supporting a metadata-only callback or an option that omits frame data?
For example:
await page.screencast.start({
path: 'video.webm',
includeFrameData: false,
onFrame: ({ timestamp, viewportWidth, viewportHeight }) => {
// Align the recorded video with an external timeline.
},
})
Another possible shape:
await page.screencast.start({
path: 'video.webm',
onFrameMetadata: ({ timestamp, viewportWidth, viewportHeight }) => {
// ...
},
})
A callback for the first recorded frame timestamp would also cover the simplest synchronization case.
I would be happy to work on an implementation if the maintainers think this API belongs in Playwright.
Feature request
page.screencast.start()can save a WebM recording and provide frame callbacks:Some consumers need only the frame timing metadata, particularly the timestamp of the first presented frame. They do not need the JPEG data.
A general use case is synchronizing a recorded browser video with an external timeline, such as test events, telemetry, captions, narration, annotations, or recordings from several pages.
Currently, using
onFramefor synchronization also delivers the JPEG buffer for every frame. Ignoringdataprevents application-level storage and decoding, but the buffer still travels through the callback path.Would you consider supporting a metadata-only callback or an option that omits frame data?
For example:
Another possible shape:
A callback for the first recorded frame timestamp would also cover the simplest synchronization case.
I would be happy to work on an implementation if the maintainers think this API belongs in Playwright.