feat: add a destroy function to destroy the whole player (#953)
* feat: add a destroy function to destroy the whole player * doc: update guidance document * Update packages/rrweb/src/replay/index.ts Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com> Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
This commit is contained in:
4
guide.md
4
guide.md
@@ -280,6 +280,9 @@ replayer.pause();
|
||||
|
||||
// pause at the fifth seconds
|
||||
replayer.pause(5000);
|
||||
|
||||
// destroy the replayer (hint: this operation is irreversible)
|
||||
replayer.destroy();
|
||||
```
|
||||
|
||||
#### Options
|
||||
@@ -385,6 +388,7 @@ The event list:
|
||||
| mouse-interaction | mouse interaction has been replayed | { type, target } |
|
||||
| event-cast | event has been replayed | event |
|
||||
| custom-event | custom event has been replayed | event |
|
||||
| destroy | destroyed the replayer | - |
|
||||
|
||||
The rrweb-replayer also re-expose the event listener via a `component.addEventListener` API.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user