@amplitude/rrweb-player 2.1.5 → 2.1.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.
@@ -5560,8 +5560,10 @@ function serializeNodeWithId(n2, options) {
5560
5560
  onSerialize(n2);
5561
5561
  }
5562
5562
  let recordChild = !skipChild;
5563
+ let isBlockedElement = false;
5563
5564
  if (serializedNode.type === NodeType$3.Element) {
5564
- recordChild = recordChild && !serializedNode.needBlock;
5565
+ isBlockedElement = Boolean(serializedNode.needBlock);
5566
+ recordChild = recordChild && !isBlockedElement;
5565
5567
  delete serializedNode.needBlock;
5566
5568
  const shadowRootEl = index$1.shadowRoot(n2);
5567
5569
  if (shadowRootEl && isNativeShadowDom(shadowRootEl)) {
@@ -5646,7 +5648,7 @@ function serializeNodeWithId(n2, options) {
5646
5648
  if (parent && isShadowRoot(parent) && isNativeShadowDom(parent)) {
5647
5649
  serializedNode.isShadow = true;
5648
5650
  }
5649
- if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "iframe") {
5651
+ if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "iframe" && !isBlockedElement) {
5650
5652
  onceIframeLoaded(
5651
5653
  n2,
5652
5654
  () => {
@@ -18550,6 +18552,22 @@ class Replayer {
18550
18552
  }
18551
18553
  }
18552
18554
  if (queue.length === pendingCount) {
18555
+ const queuedIds = new Set(queue.map((m) => m.node.id));
18556
+ let salvaged = 0;
18557
+ for (let i2 = 0; i2 < queue.length; i2++) {
18558
+ const m = queue[i2];
18559
+ if (!mirror2.getNode(m.node.id) && mirror2.getNode(m.parentId) && m.nextId !== null && m.nextId !== void 0 && m.nextId !== -1 && !mirror2.getNode(m.nextId) && !queuedIds.has(m.nextId)) {
18560
+ queue[i2] = { ...m, nextId: null };
18561
+ salvaged++;
18562
+ }
18563
+ }
18564
+ if (salvaged) {
18565
+ this.warn(
18566
+ "Inserting nodes without their next sibling since it was never recorded",
18567
+ salvaged
18568
+ );
18569
+ continue;
18570
+ }
18553
18571
  this.warn(
18554
18572
  "Dropping the resolve queue since none of the remaining nodes can be resolved",
18555
18573
  resolveTrees.map((tree) => ({