@logspace/sdk 1.1.0 → 1.1.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/logspace.esm.js +27 -2
- package/logspace.esm.js.map +1 -1
- package/logspace.iife.js +1 -1
- package/logspace.iife.js.map +1 -1
- package/logspace.umd.js +1 -1
- package/logspace.umd.js.map +1 -1
- package/package.json +2 -5
- package/sdk/types.d.ts +16 -1
package/logspace.esm.js
CHANGED
|
@@ -14541,6 +14541,23 @@ let pendingIdentity = null;
|
|
|
14541
14541
|
let currentIdentity = null;
|
|
14542
14542
|
let recoveryTargetSessionId = null;
|
|
14543
14543
|
const processedRecoverySessionIds = /* @__PURE__ */ new Set();
|
|
14544
|
+
const RECORDING_QUALITY_PRESETS = {
|
|
14545
|
+
low: {
|
|
14546
|
+
maskAllInputs: false,
|
|
14547
|
+
checkoutEveryNth: 500,
|
|
14548
|
+
recordCanvas: false
|
|
14549
|
+
},
|
|
14550
|
+
medium: {
|
|
14551
|
+
maskAllInputs: false,
|
|
14552
|
+
checkoutEveryNth: 300,
|
|
14553
|
+
recordCanvas: false
|
|
14554
|
+
},
|
|
14555
|
+
high: {
|
|
14556
|
+
maskAllInputs: false,
|
|
14557
|
+
checkoutEveryNth: 150,
|
|
14558
|
+
recordCanvas: false
|
|
14559
|
+
}
|
|
14560
|
+
};
|
|
14544
14561
|
const DEFAULT_CONFIG = {
|
|
14545
14562
|
capture: {
|
|
14546
14563
|
rrweb: true,
|
|
@@ -14557,7 +14574,8 @@ const DEFAULT_CONFIG = {
|
|
|
14557
14574
|
},
|
|
14558
14575
|
rrweb: {
|
|
14559
14576
|
maskAllInputs: false,
|
|
14560
|
-
checkoutEveryNth:
|
|
14577
|
+
checkoutEveryNth: 300,
|
|
14578
|
+
// Default to 'medium' quality
|
|
14561
14579
|
recordCanvas: false
|
|
14562
14580
|
},
|
|
14563
14581
|
privacy: {
|
|
@@ -14603,11 +14621,18 @@ const DEFAULT_CONFIG = {
|
|
|
14603
14621
|
}
|
|
14604
14622
|
};
|
|
14605
14623
|
function normalizeConfig(userConfig) {
|
|
14624
|
+
const quality = userConfig.recordingQuality || "medium";
|
|
14625
|
+
const qualityPreset = RECORDING_QUALITY_PRESETS[quality];
|
|
14626
|
+
const rrwebConfig = {
|
|
14627
|
+
...DEFAULT_CONFIG.rrweb,
|
|
14628
|
+
...qualityPreset,
|
|
14629
|
+
...userConfig.rrweb
|
|
14630
|
+
};
|
|
14606
14631
|
return {
|
|
14607
14632
|
serverUrl: userConfig.serverUrl,
|
|
14608
14633
|
apiKey: userConfig.apiKey,
|
|
14609
14634
|
capture: { ...DEFAULT_CONFIG.capture, ...userConfig.capture },
|
|
14610
|
-
rrweb:
|
|
14635
|
+
rrweb: rrwebConfig,
|
|
14611
14636
|
privacy: { ...DEFAULT_CONFIG.privacy, ...userConfig.privacy },
|
|
14612
14637
|
limits: { ...DEFAULT_CONFIG.limits, ...userConfig.limits },
|
|
14613
14638
|
autoEnd: { ...DEFAULT_CONFIG.autoEnd, ...userConfig.autoEnd },
|