diff --git a/src/replay/index.ts b/src/replay/index.ts index 255083b7..9e4c574e 100644 --- a/src/replay/index.ts +++ b/src/replay/index.ts @@ -119,7 +119,10 @@ export class Replayer { private elementStateMap!: Map; private imageMap: Map = new Map(); - + + /** The first time the player is playing. */ + private firstPlay = true; + private newDocumentQueue: addedNodeMutation[] = []; constructor( @@ -459,6 +462,11 @@ export class Replayer { break; case EventType.FullSnapshot: castFn = () => { + // Don't build a full snapshot during the first play through since we've already built it when the player was mounted. + if (this.firstPlay) { + this.firstPlay = false; + return; + } this.rebuildFullSnapshot(event, isSync); this.iframe.contentWindow!.scrollTo(event.data.initialOffset); };