@betterbugs/replay 2.0.0-alpha.24 → 2.0.0-alpha.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @rrweb/replay
1
+ # @betterbugs/replay
2
2
 
3
3
  This package contains all the necessary code to replay recorded events.
4
4
  See the [guide](../../guide.md) for more info on rrweb.
@@ -6,13 +6,13 @@ See the [guide](../../guide.md) for more info on rrweb.
6
6
  ## Installation
7
7
 
8
8
  ```bash
9
- npm install @rrweb/replay
9
+ npm install @betterbugs/replay
10
10
  ```
11
11
 
12
12
  ## Usage
13
13
 
14
14
  ```js
15
- import { Replayer } from '@rrweb/replay';
15
+ import { Replayer } from '@betterbugs/replay';
16
16
 
17
17
  const replayer = new Replayer(events, {
18
18
  // options
package/dist/replay.cjs CHANGED
@@ -11194,7 +11194,7 @@ class Replayer {
11194
11194
  speed: 1,
11195
11195
  maxSpeed: 360,
11196
11196
  root: document.body,
11197
- loadTimeout: 5e3,
11197
+ loadTimeout: 0,
11198
11198
  skipInactive: false,
11199
11199
  inactivePeriodThreshold: 10 * 1e3,
11200
11200
  showWarning: true,
@@ -11758,7 +11758,7 @@ class Replayer {
11758
11758
  head.querySelectorAll('link[rel="stylesheet"]').forEach((css) => {
11759
11759
  if (!css.sheet) {
11760
11760
  unloadSheets.add(css);
11761
- const onLoadOrError = () => {
11761
+ css.addEventListener("load", () => {
11762
11762
  unloadSheets.delete(css);
11763
11763
  if (unloadSheets.size === 0 && timer !== -1) {
11764
11764
  if (beforeLoadState.matches("playing")) {
@@ -11770,9 +11770,7 @@ class Replayer {
11770
11770
  }
11771
11771
  unsubscribe();
11772
11772
  }
11773
- };
11774
- css.addEventListener("load", onLoadOrError);
11775
- css.addEventListener("error", onLoadOrError);
11773
+ });
11776
11774
  }
11777
11775
  });
11778
11776
  if (unloadSheets.size > 0) {