Skip to content

Commit

Permalink
I forgot to pay attention to yarn format during merge of #1408
Browse files Browse the repository at this point in the history
  • Loading branch information
eoghanmurray committed Apr 17, 2024
1 parent 729361e commit e3c57f1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
42 changes: 21 additions & 21 deletions guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,27 +295,27 @@ replayer.destroy();

The replayer accepts options as its constructor's second parameter, and it has the following options:

| key | default | description |
| ------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| speed | 1 | replay speed ratio |
| root | document.body | the root element of replayer |
| loadTimeout | 0 | timeout of loading remote style sheet |
| skipInactive | false | whether to skip inactive time |
| inactivePeriodThreshold | 10000 | the threshold in milliseconds for what should be considered an inactive period |
| showWarning | true | whether to print warning messages during replay |
| showDebug | false | whether to print debug messages during replay |
| blockClass | 'rr-block' | element with the class name will display as a blocked area |
| liveMode | false | whether to enable live mode |
| insertStyleRules | [] | accepts multiple CSS rule string, which will be injected into the replay iframe |
| triggerFocus | true | whether to trigger focus during replay |
| UNSAFE_replayCanvas | false | whether to replay the canvas element. **Enable this will remove the sandbox, which is unsafe.** |
| pauseAnimation | true | whether to pause CSS animation when the replayer is paused |
| mouseTail | true | whether to show mouse tail during replay. Set to false to disable mouse tail. A complete config can be found in this [type](https://github.com/rrweb-io/rrweb/blob/9488deb6d54a5f04350c063d942da5e96ab74075/src/types.ts#L407) |
| unpackFn | - | refer to the [storage optimization recipe](./docs/recipes/optimize-storage.md) |
| logConfig | - | configuration of console output playback, refer to the [console recipe](./docs/recipes/console.md) |
| plugins | [] | load plugins to provide extended replay functions. [What is plugins?](./docs/recipes/plugin.md) |
| useVirtualDom | true | whether to use Virtual Dom optimization in the process of skipping to a new point of time |
| logger | console | The logger object used by the replayer to print warnings or errors |
| key | default | description |
| ----------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| speed | 1 | replay speed ratio |
| root | document.body | the root element of replayer |
| loadTimeout | 0 | timeout of loading remote style sheet |
| skipInactive | false | whether to skip inactive time |
| inactivePeriodThreshold | 10000 | the threshold in milliseconds for what should be considered an inactive period |
| showWarning | true | whether to print warning messages during replay |
| showDebug | false | whether to print debug messages during replay |
| blockClass | 'rr-block' | element with the class name will display as a blocked area |
| liveMode | false | whether to enable live mode |
| insertStyleRules | [] | accepts multiple CSS rule string, which will be injected into the replay iframe |
| triggerFocus | true | whether to trigger focus during replay |
| UNSAFE_replayCanvas | false | whether to replay the canvas element. **Enable this will remove the sandbox, which is unsafe.** |
| pauseAnimation | true | whether to pause CSS animation when the replayer is paused |
| mouseTail | true | whether to show mouse tail during replay. Set to false to disable mouse tail. A complete config can be found in this [type](https://github.com/rrweb-io/rrweb/blob/9488deb6d54a5f04350c063d942da5e96ab74075/src/types.ts#L407) |
| unpackFn | - | refer to the [storage optimization recipe](./docs/recipes/optimize-storage.md) |
| logConfig | - | configuration of console output playback, refer to the [console recipe](./docs/recipes/console.md) |
| plugins | [] | load plugins to provide extended replay functions. [What is plugins?](./docs/recipes/plugin.md) |
| useVirtualDom | true | whether to use Virtual Dom optimization in the process of skipping to a new point of time |
| logger | console | The logger object used by the replayer to print warnings or errors |

#### Use rrweb-player

Expand Down
5 changes: 4 additions & 1 deletion packages/rrweb-player/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ function isUserInteraction(event: eventWithTime): boolean {
* @param inactivePeriodThreshold - threshold of inactive time in milliseconds
* @returns periods of time consist with [start time, end time]
*/
export function getInactivePeriods(events: eventWithTime[], inactivePeriodThreshold: number) {
export function getInactivePeriods(
events: eventWithTime[],
inactivePeriodThreshold: number,
) {
const inactivePeriods: [number, number][] = [];
let lastActiveTime = events[0].timestamp;
for (const event of events) {
Expand Down

0 comments on commit e3c57f1

Please sign in to comment.