@logspace/sdk 1.1.1 → 1.1.4

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 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: 150,
14577
+ checkoutEveryNth: 300,
14578
+ // Default to 'medium' quality
14561
14579
  recordCanvas: false
14562
14580
  },
14563
14581
  privacy: {
@@ -14570,8 +14588,8 @@ const DEFAULT_CONFIG = {
14570
14588
  },
14571
14589
  limits: {
14572
14590
  maxLogs: 1e4,
14573
- maxSize: 10 * 1024 * 1024,
14574
- // 10MB
14591
+ maxSize: 50 * 1024 * 1024,
14592
+ // 50MB
14575
14593
  maxDuration: 1800,
14576
14594
  // 30 minutes
14577
14595
  idleTimeout: 120,
@@ -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: { ...DEFAULT_CONFIG.rrweb, ...userConfig.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 },