move all events to an enum and update guide
This commit is contained in:
19
guide.md
19
guide.md
@@ -249,6 +249,25 @@ new rrwebPlayer({
|
||||
});
|
||||
```
|
||||
|
||||
#### Events
|
||||
|
||||
Developers may want to extend the rrweb's replayer or respond to its events. Such as giving a notification when the replayer starts to skip inactive time.
|
||||
So rrweb expose a public API `on` which allow developers listen to the events and customize the reactions, and it has the following events:
|
||||
|
||||
| event | description |
|
||||
| ---------------------- | ---------------------------------- |
|
||||
| start | started to replay |
|
||||
| pause | paused the replay |
|
||||
| resume | resumed the replay |
|
||||
| finish | finished the replay |
|
||||
| fullsnapshot-rebuilded | rebuilded a full snapshot |
|
||||
| load-stylesheet-start | started to load remote stylesheets |
|
||||
| load-stylesheet-end | loaded remote stylesheets |
|
||||
| skip-start | started to skip inactive time |
|
||||
| skip-end | skipped inactive time |
|
||||
|
||||
The rrweb-replayer also re-expose the event listener via a `component.addEventListener` API.
|
||||
|
||||
## API
|
||||
|
||||
### rrweb
|
||||
|
||||
Reference in New Issue
Block a user