Contents

rrweb

0.1.9

Patch Changes

  • #5244 52c84e2 Thanks @61465! - Port upstream rrweb #1652 into the vendored MutationBuffer to fix a 9–10 s session-replay main-thread freeze when a single render mounts many sibling nodes (e.g. a 50 × 35 table at ~13 000 nodes). The pre-fix addList-based drain tail-rescanned every pass and ran in O(n²); the new drain iterates addedSet in topological order using dom.previousSibling / dom.lastChild / dom.nextSibling and runs in O(n). Fixes #5227.

    The walk-up loop treats a ShadowRoot parent as its shadow host for ancestry checks so shadow children of a moved host are never serialized before the host itself. @posthog/rrweb-utils picks up three new untainted-prototype accessors (previousSibling, nextSibling, lastChild) that the drain depends on. Nodes that still can't resolve a parent at emission time are counted and reported in one summary console.warn per emission, so a dropped subtree doesn't cascade through the replay via the console-record plugin. (2026-10-27)

  • Updated dependencies [52c84e2]:

0.1.8

Patch Changes

0.1.7

Patch Changes

  • #4320 837363e Thanks @posthog! - Bound the main-thread cost of the recorder's initial full snapshot, and start measuring it.

    stringifyStylesheet reads cssText for every CSSRule of every stylesheet, all inside the one uninterruptible task that takes the full snapshot. On CSS-heavy pages that is the dominant cost, and it has been observed freezing the UI (no rendering, scrolling, or cursor movement) for seconds. The existing maxDepth guard doesn't help, since it only bounds deep DOMs, not wide ones or heavy CSS.

    Stylesheet inlining now stops after a budget of CSSRules per snapshot (session_recording.inlineStylesheetBudgetRules, default 10,000; set 0 for the previous unbounded behaviour). Sheets past the budget are serialized without _cssText, keeping rel/href so replay can load them remotely, and are then inlined one per idle callback and delivered as attribute mutations. Replay fidelity is preserved; the work is just no longer one long blocking task.

    The snapshot's cost is also now measured and reported on captured events, so slow snapshots are visible without a browser profile: $sdk_debug_replay_slowest_full_snapshot_ms, $sdk_debug_replay_slowest_full_snapshot_stylesheet_ms, $sdk_debug_replay_slowest_full_snapshot_nodes, $sdk_debug_replay_slowest_full_snapshot_css_rules, $sdk_debug_replay_deferred_stylesheets, and, for the incremental path, $sdk_debug_replay_slowest_mutation_batch_ms. (2026-08-05)

  • Updated dependencies [837363e]:

0.1.6

Patch Changes

0.1.5

Patch Changes

  • #4223 045d79c Thanks @turnipdabeets! - Terminate the canvas encode worker when session recording stops. Previously stopping a recording with canvas capture enabled cancelled the capture loop but left the dedicated worker running; dedicated workers are not cleaned up by becoming unreachable, so every stop/start cycle leaked a worker thread along with its capture-resolution OffscreenCanvas (~8MB of pixel buffer at 1080p) and frame-fingerprint state. (2026-07-23)

0.1.4

Patch Changes

  • #4209 569fc62 Thanks @posthog! - Session recording no longer emits an uncaught TypeError: Illegal invocation from the input observer's synchronous native-setter call. The previous fix only guarded the deferred hooked setter; the synchronous original.set.call(this, value) still ran with a non-native this (a proxy, custom element, or cross-realm object) and threw inside the host page's own assignment. The recorder now probes the native getter — which fails the same internal-slot brand check as the setter — before forwarding: a non-native this is skipped, so the recorder no longer re-throws from its own frame, while genuine elements (including file inputs that legitimately throw on a programmatic value) keep their native behavior. The input event handler and getInputType are similarly guarded against reading native accessors on a non-native this. (2026-07-22)
  • Updated dependencies [569fc62]:

0.1.3

Patch Changes

  • #4157 4a2ecf5 Thanks @posthog! - Session recording no longer emits an uncaught NotAllowedError ("Sharing constructed stylesheets in multiple documents is not allowed") when a page assigns a CSSStyleSheet constructed in a different document to adoptedStyleSheets. That assignment is the host page's own invalid operation, but the recorder's patched setter sat on the call stack, so the exception was attributed to rrweb and churned fingerprints in error tracking. The recorder now contains this specific rejection (matched by its standardized NotAllowedError name, so it works even when the setter throws from an iframe realm) and skips recording those sheets, while still re-throwing any other native-setter error so host-page behaviour is preserved. (2026-07-15)

0.1.2

Patch Changes

  • #4151 81adbfd Thanks @posthog! - Session recording no longer emits an uncaught TypeError: Illegal invocation when a programmatic input-value change happens on an object that is not a genuine native input element (for example a proxy on the element prototype chain). The recorder drops that one replay update instead of throwing. (2026-07-15)

0.1.1

Patch Changes

  • #4073 f48eaf2 Thanks @pauldambra! - Canvas capture now fingerprints raw pixels before encoding, so unchanged frames skip the expensive image encode entirely. Previously every captured frame was encoded (webp/png) and base64'd just to compute a fingerprint, with unchanged frames dropped only after paying the full encode cost — for a static canvas at the default fps this burned CPU continuously for the lifetime of the page. Blank first frames are now detected from pixel data and never encoded either (previously they cost two encodes: one for the frame and one for a transparent reference blob). No response shapes changed, and unchanged-frame detection is equal or stricter: dedupe compares dimension-tagged raw pixels using two independent 32-bit hashes rather than encoded bytes, so the rare frames that previously deduped on identical lossy-encoded output now transmit, and a resize retransmits even when the raw bytes happen to match (any equal-pixel-count resize of a uniform fill, e.g. 100x200 redrawn at 200x100). The one exception in the "sends more" direction: a canvas that resizes while never having shown content stays skipped — it is blank at either size. Changed frames pay a small new pixel-readback + hash cost on top of the encode, so always-animating canvases do slightly more work per frame; static canvases — the case that burned continuously — drop from a full encode per tick to a readback + hash. (2026-07-15)

  • #4131 c50b27f Thanks @pauldambra! - fix: non-user-initiated events (media autoplay, canvas/font/stylesheet churn) no longer unfreeze a frozen page, so background activity cannot flush the frozen mutation buffer (port of upstream rrweb #1697) (2026-07-15)

0.1.0

Minor Changes

  • #4129 800af7c Thanks @pauldambra! - feat: add session_recording.attributeFilter option that passes an attribute allowlist through to the native MutationObserver, so mutations to unlisted attributes (e.g. animation-driven inline style churn) never cost recording CPU (port of upstream rrweb #1873) (2026-07-15)

Patch Changes

  • #4130 5116a41 Thanks @pauldambra! - perf: when a node is re-encountered while collecting added nodes, move it to the end of the added set so the emit phase processes adds in latest-DOM order. This avoids paying for out-of-order deferrals on large mutation batches (port of upstream rrweb #1302). (2026-07-15)
  • Updated dependencies [9bd3ef0]:

0.0.79

Patch Changes

  • #4118 f630394 Thanks @posthog! - Fix a RangeError: Maximum call stack size exceeded originating from the shared rrweb patch() helper. It patches shared globals such as Element.prototype.attachShadow (shadow-dom-manager) and the DOM/canvas observers, so multiple recorder instances or repeated start/stop cycles wrap the same global more than once. Previously an out-of-order restore silently no-op'd, leaving the wrapper in the call path; repeated cycles grew the wrapper chain without bound until a real call walked a chain deep enough to overflow the stack. Wrappers now delegate through a mutable per-layer link so any layer can be torn down even when newer wrappers sit on top of it, keeping the chain bounded. Recording behavior is unchanged. This applies the same fix as #4063 (fetch/XHR) to the shared helper so every rrweb-record caller inherits the bounded-chain behavior. (2026-07-10)
  • Updated dependencies [f630394]:

0.0.78

Patch Changes

  • #4113 45f17ee Thanks @TueHaulund! - fix session replay leaking a shadow-root observer when a same-origin iframe is removed

    Follow-up to the shadow-observer iframe-teardown fix: takeFullSnapshot's onSerialize registers every shadow root with the top-level document, so a root nested in a same-origin iframe was keyed to the wrong document and its observer/buffer were not disconnected when that iframe was removed (they lingered until the next full snapshot). addShadowRoot now derives the owning document from the host element, so per-document teardown matches iframe-nested roots too. (2026-07-08)

0.0.77

Patch Changes

0.0.76

Patch Changes

  • #4112 38bb185 Thanks @TueHaulund! - fix session replay silently dropping shadow DOM mutations after an iframe teardown

    The single shared ShadowDomManager observes every shadow root on the page, but MutationBuffer.reset() disconnected it. That reset fires whenever any one buffer is torn down, so an iframe being removed or navigating away disconnected every shadow-root observer page-wide. Shadow DOM content (for example a widget mounted in an open shadow root) then stopped recording until the next periodic full snapshot re-registered it. Buffer teardown now releases only its own resources; global shadow observation is reset by takeFullSnapshot and on recording stop. (2026-07-08)

0.0.75

Patch Changes

  • #4033 e803b8f Thanks @posthog! - Session replay: guard the canvas recording inline worker against blob-script load failures. When a strict page CSP (worker-src / script-src blob:), an ad blocker, or a network hiccup prevents the inline worker from loading, canvas snapshotting now disables itself quietly instead of surfacing an uncaught NetworkError. The rest of session replay keeps working. (2026-07-01)

0.0.74

Patch Changes

  • #3885 5392a55 Thanks @pauldambra! - feat(replay): capture canvas at reduced resolution

    Adds session_recording.canvasCapture.resolutionScale - a (0, 1] fraction of the canvas display size to capture replay frames at. The captured bitmap is downscaled (pixel-area savings are quadratic) while the canvas's true display size is still recorded, so playback stretches the smaller frame back to the correct dimensions and aspect ratio - only sharpness drops, never layout. It defaults to 1 (full resolution, matching today's behaviour), and the latest defaults bundle (2026-05-30) opts new installs into 0.6.

    The canvas's true display size travels with each frame through the encode worker (as required message fields), so the encoded reply is always drawn back to the correct dimensions — no per-canvas state is retained on the main thread, and downscaling can never mislabel a canvas's dimensions. At full resolution the captured pixels are unchanged (the quality resampling hint is only applied when actually downscaling); the emitted drawImage now always uses the explicit destination-size form, which is pixel-equivalent on replay.

    Mechanically, @posthog/rrweb's canvas FPS-snapshot observer takes an optional canvasResolutionScale record option and downscales each captured frame accordingly. (2026-06-19)

0.0.73

Patch Changes

  • #3853 f95a0ec Thanks @TueHaulund! - Capture native Fullscreen API transitions in session replay. Entering native fullscreen (element.requestFullscreen()) is rendered by the browser via the UA :fullscreen pseudo-class with no DOM mutation, so the recorder previously captured nothing and replays showed the element at its pre-fullscreen size with drifted click coordinates. The recorder now emits a reserved custom event on fullscreenchange (standard plus webkit/moz/MS prefixes), and the replayer re-applies fullscreen layout to the element on playback (including when scrubbing into a fullscreen region) via a reserved rr_fullscreen attribute, consistent with rrweb's existing rr_* attribute namespace.

    Known limitation: fullscreen of an element inside a same-origin iframe is recorded against the <iframe> element rather than the inner element, so replay pins the iframe. (2026-06-16)

  • Updated dependencies [f95a0ec]:

0.0.72

Patch Changes

  • #3767 fdc07f3 Thanks @arnohillen! - replay: jump scrolls instantly when seeking past pages that use scroll-behavior: smooth. During fast-forward the replayer applied scrolls with behavior: 'auto', which inherits the page's CSS scroll-behavior — so on sites that set scroll-behavior: smooth (e.g. Silk bottom sheets/modals) a seeked scroll animated from 0 instead of jumping, leaving scroll-revealed content (the open sheet) out of view and showing only the backdrop until the animation caught up. Sync scrolls now use behavior: 'instant', matching the method's stated intent that smooth scrolling be disabled while fast-forwarding. Full snapshot rebuilds apply their initial offset with behavior: 'instant' too, so the document-level scroll doesn't animate either. (2026-06-11)

0.0.71

Patch Changes

  • #3742 23b2af1 Thanks @arnohillen! - record: capture resting scroll offset on scrollend when a reveal scroll clamps to 0 before its target is scrollable (e.g. Silk sheets). Deduped against scroll so normal gestures don't double event volume. (2026-06-10)

0.0.70

Patch Changes

  • #3787 0e22d77 Thanks @TueHaulund! - replayer: stop corrupting recordings when events are added behind the playhead. addEvent() used to apply any event older than the playback baseline synchronously onto the current DOM — correct for live-mode catch-up, but wrong for on-demand playback where snapshot chunks can finish loading after the user has seeked ahead. Applying those past mutations onto a DOM at a different position made their removes fail mirror lookups, and applyMutation then deleted the failed entries from the event objects themselves, so every later seek rebuilt from corrupted data (DOM nodes accumulating, e.g. duplicated text) and exports serialized the stripped events. Past events are now only applied synchronously in live mode (otherwise they are just inserted for the next seek to pick up), and applyMutation filters removes into a local copy instead of mutating the event data. (2026-06-10)

0.0.69

Patch Changes

  • #3726 74345e3 Thanks @arnohillen! - canvas recording: reference-count CanvasManager teardown so it survives secondary-root cleanup. A single CanvasManager is shared by the main document and every iframe / shadow-root observer; previously tearing down any one of those (e.g. an iframe unloading, or a framework unmounting a subtree rrweb was observing) unpatched HTMLCanvasElement.prototype.getContext and cancelled the FPS loop for the whole page, silently stopping canvas recording while the session stayed active. The manager now only tears down once the last consumer releases. (2026-06-03)

0.0.68

Patch Changes

  • #3736 374962a Thanks @arnohillen! - replay: re-apply scroll positions after fast-forward/seek. Scrolls applied mid-catch-up could clamp to 0 when the target wasn't scrollable yet (e.g. scroll-revealed sheets/modals whose content sits below the fold), leaving the content scrolled out of view on replay. The last scroll per node is now re-applied in the flush stage once layout has settled. posthog-js is bumped too so the rebuilt bundle containing the fix is published. (2026-06-03)

0.0.67

Patch Changes

  • #3678 add2fae Thanks @ksvat! - fix(replay): keep ph-no-capture placeholders in normal flow during replay. Blocked elements were rebuilt with position: absolute + recorded left/top regardless of how they were originally positioned, pulling in-flow elements (flex/grid children, inline spans) out of flow and collapsing sibling layout. Snapshot now captures the element's computed position, transform, and display; rebuild only forces absolute positioning when the original was non-static or contributed a transform, and promotes inline placeholders to inline-block so the redacted slot is preserved. Old recordings without the new attributes keep the legacy absolute behavior. (2026-05-27)
  • Updated dependencies [add2fae]:

0.0.66

Patch Changes

  • #3667 cafa9cc Thanks @pauldambra! - fix(replay): stop polling preload-as-style <link> elements forever. Session recorder treated <link rel="preload" as="style" href="*.css"> as if it were a stylesheet and waited for link.sheet to populate. Per spec preload links never instantiate a CSSStyleSheet, so the wait timed out, re-serialized the link, scheduled another wait, and leaked a load listener on every cycle — multiplying further on every real load event. Pages with Next.js-style CSS preloads accumulated thousands of active polling chains, saturating the main thread and freezing the tab on refocus (2026-05-26)
  • Updated dependencies [cafa9cc]:

0.0.65

Patch Changes

0.0.64

Patch Changes

  • #3558 3d93020 Thanks @marandaneto! - Fix iframe mutation buffer cleanup when iframe pagehide events overlap. (2026-05-11)

0.0.63

Patch Changes

0.0.62

Patch Changes

  • #3527 33aa019 Thanks @TueHaulund! - Skip canvas snapshot while WebGL context is lost. On mobile under GPU pressure or tab backgrounding, createImageBitmap returns a transparent bitmap rather than throwing for a context-lost WebGL canvas. The worker's first-frame transparency check then suppresses emission and stores the transparent fingerprint in lastFingerprintMap, so once the context restores and three.js re-renders, identical-fingerprint frames get deduped against the transparent baseline and the canvas appears to never record. Pre-flight gl.isContextLost() and skip the snapshot while the context is down. Also wrap the getCanvas() shadow-root walk in try/catch so a traversal exception cannot cancel the rAF loop and silently kill canvas recording for the rest of the session. (2026-05-05)

0.0.61

Patch Changes

  • #3510 a5d86c9 Thanks @arnaudhillen! - Move posthog-rrweb sources into the posthog-js monorepo under packages/rrweb/. The seven packages we publish (@posthog/rrweb, @posthog/rrweb-types, @posthog/rrweb-utils, @posthog/rrdom, @posthog/rrweb-snapshot, @posthog/rrweb-record, @posthog/rrweb-plugin-console-record) now release from this repo via the existing changesets pipeline. No runtime behavior changes. (2026-05-05)
  • Updated dependencies [a5d86c9]:

2.0.0-alpha.18

Minor Changes

Patch Changes

2.0.0-alpha.17

Minor Changes

Patch Changes

2.0.0-alpha.16

Patch Changes

2.0.0-alpha.15

Major Changes

  • #1497 2606a2a Thanks @Juice10! - Split plugins out of rrweb and move them into their own packages: @rrweb/packer, @rrweb/rrweb-plugin-canvas-webrtc-record, @rrweb/rrweb-plugin-canvas-webrtc-replay, @rrweb/rrweb-plugin-sequential-id-record, @rrweb/rrweb-plugin-sequential-id-replay, @rrweb/rrweb-plugin-console-record, @rrweb/rrweb-plugin-console-replay. Check out the README of each package for more information or check out https://github.com/rrweb-io/rrweb/pull/1033 to see the changes.

  • #1497 2606a2a Thanks @Juice10! - Distributed files have new filenames, paths and extensions. Important: If you reference distributed files or types directly, you might have to update your paths/filenames. E.g. you import from rrweb/typings/... or rrdom/es. However you run import rrweb from '@posthog/rrweb' you won't notice a difference with this change. If you include rrweb files directly in a script tag, you might have to update that path to include a the .umd.cjs files instead. All .js files now use ES modules which can be used in modern browsers, node.js and bundlers that support ES modules. All npm packages now also ship .cjs and .umd.cjs files. The .umd.cjs files are CommonJS modules that bundle all files together to make it easy to ship one file to browser environments (similar to the previous .js files). The .cjs files are CommonJS modules that can be used in older Node.js environments. Types should be better defined in package.json and if you need specific types they might be exported from new packages (for example PlayerMachineState and SpeedMachineState are now exported from @rrweb/replay). Check the package.json's main and exports field for the available files.

  • #1497 2606a2a Thanks @Juice10! - Remove the rrweb-all.js, rrweb-record.js, and rrweb-replay.js files from rrweb package. Now you can use @rrweb/all, @rrweb/record, and @rrweb/replay packages instead. Check out the README of each package for more information or check out PR #1033 to see the changes.

Patch Changes

2.0.0-alpha.14

Patch Changes

2.0.0-alpha.13

Minor Changes

  • #1432 123a81e Thanks @Juice10! - Full overhawl of video and audio element playback. More robust and fixes lots of bugs related to pausing/playing/skipping/muting/playbackRate etc.

Patch Changes

2.0.0-alpha.12

Minor Changes

Patch Changes

2.0.0-alpha.11

Patch Changes

2.0.0-alpha.10

Patch Changes

  • #1269 7103625 Thanks @eoghanmurray! - Don't include redundant data from text/attribute mutations on just-added nodes

  • #1268 d872d28 Thanks @eoghanmurray! - Compact style mutation fixes and improvements

    • fixes when style updates contain a 'var()' on a shorthand property #1246
    • further ensures that style mutations are compact by reverting to string method if it is shorter
  • #1262 36da39d Thanks @billyvg! - feat: Add ignoreSelector option

    Similar to ignoreClass, but accepts a CSS selector so that you can use any CSS selector.

  • #1251 bbbfa22 Thanks @wfk007! - fix: Resize and MediaInteraction events repeat generated after the iframe appeared

  • #1254 d0fbe23 Thanks @mydea! - Handle case where event is null/undefined

  • #1273 a3de582 Thanks @Juice10! - Canvas FPS recording: override preserveDrawingBuffer: true on canvas creation. Canvas replay: fix flickering canvas elemenrs. Canvas FPS recording: fix bug that wipes webgl(2) canvas backgrounds while recording.

  • Updated dependencies [d872d28, c6600e7]:

2.0.0-alpha.9

Patch Changes

2.0.0-alpha.8

Minor Changes

Patch Changes

2.0.0-alpha.7

Minor Changes

  • #1170 d2582e9 Thanks @mydea! - feat: Ensure password inputs remain masked when switching input type

  • #1107 a225d8e Thanks @mydea! - feat: Allow to pass errorHandler as record option

Patch Changes

  • #1179 e0f862b Thanks @wfk007! - Fix: #1178 remove warning related to worker_threads while building

  • #1186 267e990 Thanks @YunFeng0817! - Fix: processed-node-manager is created even in the environment that doesn't need a recorder

  • #1145 a82a3b4 Thanks @eoghanmurray! - For a mutation which removes a node, reduce the number of spurious warnings to take into account that an anscestor (rather than just a parent) may have been just removed

  • #1191 1e6f71b Thanks @Juice10! - Only apply touch-active styling on flush

  • #1191 1e6f71b Thanks @Juice10! - Trigger mouse movement and hover with mouse up and mouse down events when replayer.pause(...) is called.

  • #1163 4cb4d0e Thanks @zhaobosky! - Fix: some websites rebuild imcomplete

    1. Some websites, addedSet in emit function is not empty, but the result converted from Array.from is empty.
    2. Some websites polyfill classList functions of HTML elements. Their implementation may throw errors and cause the snapshot to fail. I add try-catch statements to make the code robust.
  • Updated dependencies [d2582e9, e7f0c80]:

2.0.0-alpha.6

Patch Changes

2.0.0-alpha.5

Patch Changes