🚀 Feature Request
Currently, Playwright supports basic video recording, but it is limited to WebM format and records the entire session from start to finish. I would like to suggest adding native support for the MP4 format and introducing a way to pause and resume video recording during a test session.
Example
Here is a conceptual idea of how the API could look in JavaScript/TypeScript:
// Start recording with MP4 format
const context = await browser.newContext({
recordVideo: { dir: 'videos/', format: 'mp4' }
});
const page = await context.newPage();
// Pause recording during unnecessary operations
await page.video().pause();
await page.waitForTimeout(5000);
// Resume when the critical test step starts
await page.video().resume();
await page.click('#submit-order');
Motivation
This feature would be incredibly helpful for:
- Saving Storage: Being able to pause recording during long wait times or idle states will significantly reduce file sizes.
- Better Compatibility: MP4 is globally supported across all operating systems and presentations without needing external converters.
- Clean Reports: It allows developers to record only the critical parts of a test, making debugging videos much shorter and easier to review.
🚀 Feature Request
Currently, Playwright supports basic video recording, but it is limited to WebM format and records the entire session from start to finish. I would like to suggest adding native support for the MP4 format and introducing a way to pause and resume video recording during a test session.
Example
Here is a conceptual idea of how the API could look in JavaScript/TypeScript:
Motivation
This feature would be incredibly helpful for: