@rrweb/record
v2.0.1
Published
This package contains all the record related code in rrweb. See the [guide](../../guide.md) for more info on rrweb.
Readme
@rrweb/record
This package contains all the record related code in rrweb. See the guide for more info on rrweb.
Installation
1) Bundler / npm (Recommended)
npm install @rrweb/recordimport { record } from '@rrweb/record';2) Browser Without Bundler (ESM)
Use the CDN-hosted @rrweb/record browser asset when loading directly in the
browser:
<script type="module">
import { record } from 'https://cdn.rrweb.com/record/current/dist/record.js';
</script>Use current for the latest stable release, or pin an exact version such as
https://cdn.rrweb.com/record/2.0.0/dist/record.js for immutable
production URLs.
3) Legacy Direct <script> Include (UMD fallback)
Use this only for compatibility with non-module environments.
<script src="https://cdn.rrweb.com/record/current/dist/record.umd.cjs"></script>The legacy UMD global is rrwebRecord.
Usage
import { record } from '@rrweb/record';
record({
emit(event) {
// send event to server
},
});Notes
Currently this package is really just a wrapper around the record function in the main rrweb package.
All record related code will get moved here in the future.
Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site.
Gold Sponsors 🥇
Silver Sponsors 🥈
Bronze Sponsors 🥉
