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