<commit_before># puppeteer-recorder
Record animations using puppeteer. Based on electron-recorder.

# Usage
```
const { record } = require('puppeteer-recorder');

await record({
  output: 'output.webm',
  fps: 60,
  frames: 60 * 5, // 5 seconds at 60 fps
  prepare: function (browser, page) { /* executed before first capture */ },
  render: function (browser, page, frame) { /* executed before each capture */ }
});
```<commit_msg>Updated usage example in the readme.<commit_after># puppeteer-recorder
Record animations using puppeteer. Based on electron-recorder.

# Usage
```
const { record } = require('puppeteer-recorder');

await record({
  browser: null, // Optional: a puppeteer Browser instance,
  page: null, // Optional: a puppeteer Page instance,
  output: 'output.webm',
  fps: 60,
  frames: 60 * 5, // 5 seconds at 60 fps
  prepare: function (browser, page) { /* executed before first capture */ },
  render: function (browser, page, frame) { /* executed before each capture */ }
});
```
{'fraction_non_alphanumeric': 0.13886113886113885, 'fraction_numerical': 0.015984015984015984, 'mean_word_length': 4.035175879396985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2381148', 'n_tokens_mistral': 326, 'n_tokens_neox': 302, 'n_words': 107}