@zaplier/sdk 1.3.5 → 1.3.6

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/index.esm.js CHANGED
@@ -19064,19 +19064,18 @@ class SessionReplayEngine {
19064
19064
  this.hasFullSnapshot = false;
19065
19065
  this.startTime = Date.now();
19066
19066
  this.startBatchTimer();
19067
- // WORKAROUND: Force FullSnapshot creation to fix rrweb 2.0.0-alpha bug
19067
+ // WORKAROUND: Force FullSnapshot creation IMMEDIATELY to fix rrweb 2.0.0-alpha bug
19068
19068
  // where FullSnapshot is sometimes not created as the first event
19069
19069
  setTimeout(() => {
19070
- if (!this.hasFullSnapshot) {
19071
- console.warn("[Zaplier] ⚠️ FullSnapshot not created automatically, forcing manual capture...");
19072
- try {
19073
- takeFullSnapshot(true); // Force a new FullSnapshot
19074
- }
19075
- catch (error) {
19076
- console.error("[Zaplier] Failed to force FullSnapshot:", error);
19077
- }
19070
+ console.log("[Zaplier] Forcing immediate FullSnapshot to ensure correct event order...");
19071
+ try {
19072
+ takeFullSnapshot(true); // Force a new FullSnapshot immediately
19073
+ console.log("[Zaplier] FullSnapshot manually triggered");
19074
+ }
19075
+ catch (error) {
19076
+ console.error("[Zaplier] Failed to force FullSnapshot:", error);
19078
19077
  }
19079
- }, 500); // Give rrweb a chance to create natural FullSnapshot first
19078
+ }, 100); // Very short delay to ensure it comes first
19080
19079
  // Set timeout to check if FullSnapshot was captured
19081
19080
  this.snapshotTimeout = window.setTimeout(() => {
19082
19081
  if (!this.hasFullSnapshot) {