@kalayanasundaram123/rrweb 2.0.1 → 2.0.2
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/dist/rrweb.cjs +9 -2
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.js +9 -2
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +9 -2
- package/dist/rrweb.umd.cjs.map +2 -2
- package/dist/rrweb.umd.min.cjs +2 -2
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +1 -1
- package/umd/rrweb.js +9 -2
- package/umd/rrweb.min.js +2 -2
package/dist/rrweb.js
CHANGED
|
@@ -13961,6 +13961,13 @@ function WorkerWrapper(options) {
|
|
|
13961
13961
|
objURL && (self.URL || self.webkitURL).revokeObjectURL(objURL);
|
|
13962
13962
|
}
|
|
13963
13963
|
}
|
|
13964
|
+
function canCreateBlobWorker(win) {
|
|
13965
|
+
try {
|
|
13966
|
+
return typeof Worker !== "undefined" && win.origin != null && win.origin !== "null";
|
|
13967
|
+
} catch {
|
|
13968
|
+
return false;
|
|
13969
|
+
}
|
|
13970
|
+
}
|
|
13964
13971
|
class CanvasManager {
|
|
13965
13972
|
constructor(options) {
|
|
13966
13973
|
__publicField(this, "pendingCanvasMutations", /* @__PURE__ */ new Map());
|
|
@@ -13996,7 +14003,7 @@ class CanvasManager {
|
|
|
13996
14003
|
this.mutationCb = options.mutationCb;
|
|
13997
14004
|
this.mirror = options.mirror;
|
|
13998
14005
|
this.options = options;
|
|
13999
|
-
if (recordCanvas && typeof sampling === "number") {
|
|
14006
|
+
if (recordCanvas && typeof sampling === "number" && canCreateBlobWorker(win)) {
|
|
14000
14007
|
this.worker = this.initFPSWorker();
|
|
14001
14008
|
}
|
|
14002
14009
|
this.addWindow(win);
|
|
@@ -14004,7 +14011,7 @@ class CanvasManager {
|
|
|
14004
14011
|
this.startRAFTimestamping();
|
|
14005
14012
|
this.startPendingCanvasMutationFlusher();
|
|
14006
14013
|
}
|
|
14007
|
-
if (recordCanvas && typeof sampling === "number") {
|
|
14014
|
+
if (recordCanvas && typeof sampling === "number" && this.worker) {
|
|
14008
14015
|
this.initCanvasFPSObserver();
|
|
14009
14016
|
}
|
|
14010
14017
|
}
|