update rrweb-snapshot minor version and set max skip speed
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
也可以在 URL 中指定具体的版本号,例如:
|
||||
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/npm/rrweb@0.6.7/dist/rrweb.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/rrweb@0.7.0/dist/rrweb.min.js"></script>
|
||||
```
|
||||
|
||||
#### 仅引入录制部分
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
"dependencies": {
|
||||
"@types/smoothscroll-polyfill": "^0.3.0",
|
||||
"mitt": "^1.1.3",
|
||||
"rrweb-snapshot": "^0.6.11",
|
||||
"rrweb-snapshot": "^0.7.0",
|
||||
"smoothscroll-polyfill": "^0.4.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ export class Replayer {
|
||||
const skipTime =
|
||||
this.nextUserInteractionEvent.delay! - event.delay!;
|
||||
const payload = {
|
||||
speed: Math.round(skipTime / SKIP_TIME_INTERVAL),
|
||||
speed: Math.min(Math.round(skipTime / SKIP_TIME_INTERVAL), 360),
|
||||
};
|
||||
this.setConfig(payload);
|
||||
this.emitter.emit('skip-start', payload);
|
||||
|
||||
Reference in New Issue
Block a user