@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.umd.cjs
CHANGED
|
@@ -13985,6 +13985,13 @@ function WorkerWrapper(options) {
|
|
|
13985
13985
|
objURL && (self.URL || self.webkitURL).revokeObjectURL(objURL);
|
|
13986
13986
|
}
|
|
13987
13987
|
}
|
|
13988
|
+
function canCreateBlobWorker(win) {
|
|
13989
|
+
try {
|
|
13990
|
+
return typeof Worker !== "undefined" && win.origin != null && win.origin !== "null";
|
|
13991
|
+
} catch (e2) {
|
|
13992
|
+
return false;
|
|
13993
|
+
}
|
|
13994
|
+
}
|
|
13988
13995
|
class CanvasManager {
|
|
13989
13996
|
constructor(options) {
|
|
13990
13997
|
__publicField(this, "pendingCanvasMutations", /* @__PURE__ */ new Map());
|
|
@@ -14015,7 +14022,7 @@ class CanvasManager {
|
|
|
14015
14022
|
this.mutationCb = options.mutationCb;
|
|
14016
14023
|
this.mirror = options.mirror;
|
|
14017
14024
|
this.options = options;
|
|
14018
|
-
if (recordCanvas && typeof sampling === "number") {
|
|
14025
|
+
if (recordCanvas && typeof sampling === "number" && canCreateBlobWorker(win)) {
|
|
14019
14026
|
this.worker = this.initFPSWorker();
|
|
14020
14027
|
}
|
|
14021
14028
|
this.addWindow(win);
|
|
@@ -14023,7 +14030,7 @@ class CanvasManager {
|
|
|
14023
14030
|
this.startRAFTimestamping();
|
|
14024
14031
|
this.startPendingCanvasMutationFlusher();
|
|
14025
14032
|
}
|
|
14026
|
-
if (recordCanvas && typeof sampling === "number") {
|
|
14033
|
+
if (recordCanvas && typeof sampling === "number" && this.worker) {
|
|
14027
14034
|
this.initCanvasFPSObserver();
|
|
14028
14035
|
}
|
|
14029
14036
|
}
|