Commit Graph

1214 Commits

Author SHA1 Message Date
Stefan Sundin
e117803eae Add "types" field to fix error when using "moduleResolution": "NodeNext" (#1369)
* Add "types" field to fix error when using "moduleResolution": "NodeNext".

* Add changeset.
2026-04-01 12:00:00 +08:00
Daniel Engelke
7e586f4c90 Fix for test cases mentioned in #1379 (#1401)
* Fix known issues

* Run format

* Fix linting errors

* Add comment in code for source of match logic

* Add changeset
2026-04-01 12:00:00 +08:00
Justin Halsall
f6543be763 Full overhawl of video & audio playback to make it more complete (#1432)
* Add support for capturing media attributes in rrweb-snapshot

* Add loop to mediaInteractionParam

* Add support for loop in RRMediaElement

* Add support for recording loop attribute on media elements

* Update video playback and fix bugs

* Update cross-origin iframe media attributes and player state
2026-04-01 12:00:00 +08:00
Eoghan Murray
c61c906e31 I forgot to pay attention to yarn format during merge of #1408 (#1452) 2026-04-01 12:00:00 +08:00
Antonio Villegas
2ac93b18c7 Expose constant SKIP_TIME_THRESHOLD as inactivePeriodThreshold in replayer (#1408)
Expose constant SKIP_TIME_THRESHOLD as `inactivePeriodThreshold` config setting in replayer
2026-04-01 12:00:00 +08:00
David Newell
5956f9b4aa protect against no parent node (#1445)
* protect against a missing parent node during a mutation on an textNode
2026-04-01 12:00:00 +08:00
Manoel Aranda Neto
8a93739766 fix: createImageBitmap throws DOMException if source is 0 (#1422)
* fix: createImageBitmap throws DOMException if source is 0

* code review

* fix

* Create breezy-cats-heal.md

* fix format

---------

Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Justin Halsall
169e10e94a Chore: Make inject script more robust on repl & stream (#1429)
* try/catch injection of recording script in rrweb repl and stream

* Add empty changesets
2026-04-01 12:00:00 +08:00
github-actions[bot]
fb2d921180 Version Packages (alpha) (#1291)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Daniel Engelke
763ac64130 Add HowdyGo to Who's using rrweb (#1423)
* Add HowdyGo to Who's using rrweb

* Create twenty-goats-kneel.md

---------

Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Eoghan Murray
585c5c7ac3 Fix some css issues with :hover and rewrite max-device-width (#1431)
* We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses

* The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet

 - not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem:

--- a/packages/rrweb-snapshot/test/rebuild.test.ts
+++ b/packages/rrweb-snapshot/test/rebuild.test.ts
@@ -151,6 +185,7 @@ describe('rebuild', function () {
         path.resolve(__dirname, './css/benchmark.css'),
         'utf8',
       );
+      cssText = cssText.replace(/:hover/g, '');

       const start = process.hrtime();
       addHoverClass(cssText, cache);

* Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport

* Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases

* Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests

* Apply formatting changes

* Create rotten-spies-enjoy.md

* Apply formatting changes

* Add correct typing on `getSelectors`

* Refactor CSS interfaces to include optional rules

* Change `rules` to be non optional

---------

Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
juliecheng
3da2652950 fix: scrolling can be incorrect when fast-forwarding (#1352)
* fix: scrolling can be incorrect when fast-forwarding

* add test case

* add changeset and remove duplicate diffProps process

---------

Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
2026-04-01 12:00:00 +08:00
xujiujiu
3f4bf14dfb fix guide doc (#1415) 2026-04-01 12:00:00 +08:00
Andrew Pomeroy
8b90bd8f62 Capture stylesheets designated as rel="preload" (#1374)
* feat(Snapshot): Capture stylesheets designated as `rel="preload"`

* fix(Snapshot): Harden asset file extension matching

* Add changeset

* chore: Lint

* Tweak regex, add try-catch block on URL constructor
2026-04-01 12:00:00 +08:00
Antonio Villegas
8d555c1b1c Make properties x and y optional in mouseInteractionParam (#1375)
* Make properties x and y optional in mouseInteractionParam

The event representing a mouse interaction of focus an element does not include the properties x and y. Thus, they must be defined as optional.

* Fix typings
2026-04-01 12:00:00 +08:00
yz-yu
a939c792db fix the test CI (#1405)
* run tests without concurrency

* do not use cache in rpt2 during test
2026-04-01 12:00:00 +08:00
Patrick Lopes
297e4bc4c7 Rrvideo receipe update (#1390)
* Update export-to-video.md

The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.

* Update export-to-video.zh_CN.md

The file was pointing to the old Rrvideo repo The old repository soon is going to be closed as the Rrvideo was merged on Rrweb This change is pointing this recipe to the new and updated official doc.

Chinese version
2026-04-01 12:00:00 +08:00
Paul D'Ambra
77e12e4f54 fix: console logger can serialize bigint values (#1403)
* fix: console logger can serialize bigint values

* teach test jsdom is present

* add a changeset
2026-04-01 12:00:00 +08:00
David Newell
6510e32456 chore: export canvasMutation (#1383)
* chore: export canvasMutation

* add changeset
2026-04-01 12:00:00 +08:00
Justin Halsall
04a5ce9ad8 Docs: Add rrweb presentation + open to consulting (#1388)
* Add rrweb presentation

Add Justin Halsall open to rrweb consulting

* Create few-rockets-travel.md

* Update README.md

* Update README.md

* Fix alignment
2026-04-01 12:00:00 +08:00
Buleandra Cristian
30fda9d726 Add UXWizz to Readme (#1371)
* Add UXWizz to Readme (CN)

* Add UXWizz to Readme

* Create hip-worms-relax.md

---------

Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Justin Halsall
43bce2b6e0 [chore] [ci] Update Node version to LTS (#1365)
* Update Node version to LTS

* Create silver-windows-float.md
2026-04-01 12:00:00 +08:00
Justin Halsall
e763ada2c1 [chore] Update changesets (#1362) 2026-04-01 12:00:00 +08:00
huangkairan
2db6264887 perf(web-extension): conditional check (#1360)
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
2026-04-01 12:00:00 +08:00
Paul D'Ambra
f91d22bf31 chore: update linters (#1355)
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Eoghan Murray
a8d93986f4 Fix serialization and mutation of <textarea> elements (#1351)
* Fix serialization and mutation of <textarea> elements taking account the duality that the value can be set in either the child node, or in the value _parameter_ (not attribute)

* Backwards compatibility: Bug fix and regression test for #112
 - this is to fix up 'historical' recordings, as duplicate textarea content should no longer be being created at record time
 - new test shows what the snapshot generated by previous versions of rrweb used to look like, hence 'bad'
 - original 0efe23f04a fix either didn't work or no longer works due to childNodes being appended subsequent to this part of the code
 - during review, we also verified that the `_cssText` case should still be handled okay, as there's currently no scenario where csstext is present with css child nodes of a <style>

* Masking: Fix that textarea values were being missed by the masking system if the value was recorded as a child node
 - I didn't notice that form.html was used in other tests, so lucky that I noticed that those tests also should have the 'pre value' masked out

* Simplify by always storing the textarea value in the `.value` attribute (from it's DOM property) and not as a childNode. It should still be rebuilt as a childNode rather than a property
---------

Authored-by: eoghanmurray <eoghan@getthere.ie>
2026-04-01 12:00:00 +08:00
Eoghan Murray
d1d0c7f366 Masking: Avoid the repeated calls to closest when recursing through the DOM (#1349)
* masking performance: avoid the repeated calls to `closest` when recursing through the DOM
 - needsMask===true means that an ancestor has tested positively for masking, and so this node and all descendents should be masked
 - needsMask===false means that no ancestors have tested positively for masking, we should check each node encountered
 - needsMask===undefined means that we don't know whether ancestors are masked or not (e.g. after a mutation) and should look up the tree
* Add tests including an explicit characterData mutation tests 
* Further performance improvement: avoid calls to `el.matches` when on a leaf node, e.g. a `<br/>`
---------

Authored-by: eoghanmurray <eoghan@getthere.ie>
Based on initial PR #1338 by Alexey Babik <alexey.babik@noibu.com>
2026-04-01 12:00:00 +08:00
Yun Feng
4157f28e7b Feat: Add support for replaying :defined pseudo-class of custom elements (#1155)
* Feat: Add support for replaying :defined pseudo-class of custom elements

* add isCustom flag to serialized elements

Applying Justin's review suggestion

* fix code lint error

* add custom element event

* fix: tests (#1348)

* Update packages/rrweb/src/record/observer.ts

* Update packages/rrweb/src/record/observer.ts

---------

Co-authored-by: Nafees Nehar <nafees87n@gmail.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Eoghan Murray
1647bc3875 Md create html document (#1321)
* only call createHTMLDocument where it is needed

* Perf: create the mutation document once as a 'singleton' as it can be reused

---------

Co-authored-by: Michael Dellanoce <mdellanoce@pendo.io>
2026-04-01 12:00:00 +08:00
Billy Vong
2de4c0d326 fix(web-extension): Fix types in vite config (#1333) 2026-04-01 12:00:00 +08:00
Lukas Boehler
910fa46d78 Added Gleap.io to "Who's using rrweb?" (#1332)
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
huangkairan
228a72e1e8 fix(web-extension): beforeunload logic (#1330) 2026-04-01 12:00:00 +08:00
Michael Dellanoce
a8dcca54d8 perf(rrweb): attribute mutation optimization (#1343) 2026-04-01 12:00:00 +08:00
Francesco Novy
6dafa924d2 ref: Avoid unnecessary cloning of objects or arrays (#1340) 2026-04-01 12:00:00 +08:00
Justin Halsall
637264c225 Fix linting issues (#1347)
* Fix linting issues

* Apply formatting changes
2026-04-01 12:00:00 +08:00
蟹老板
532fc89a61 Pref: export eventWithTime (#1324)
*  export eventWithTime for consumption in typescript code
2026-04-01 12:00:00 +08:00
huangkairan
f57028fa28 🐞 fix(web-extension): typo (#1307)
Co-authored-by: Yun Feng <yun.feng0817@gmail.com>
2026-04-01 12:00:00 +08:00
Francesco Novy
cd577d4d1d fix: Fix checking for patchTarget in initAdoptedStyleSheetObserver (#1327) 2026-04-01 12:00:00 +08:00
Ben White
db334d2405 Extended text masking function to include relevant HTMLElement (#1310)
* Extends maskTextFn to pass the HTMLElement to the deciding function

---------

Authored-by: benjackwhite <benjackwhite@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
2026-04-01 12:00:00 +08:00
Eoghan Murray
5e47fac5d0 Add config option to turn off all snapshotting and related observers (#1311)
* Add config option to turn off all snapshotting and related observers

 - allows RRWEB to be used for click/movement tracking alone, e.g. for a heatmaps use case
 - could also be used if there was a separate process for recording the DOM (in which case a 3rd party library like https://github.com/antonmedv/finder could be added to record targets instead of the mirror)
---------

Authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Kento Moriwaki
d22225bd1b Enable preserveSource (#1309) 2026-04-01 12:00:00 +08:00
Eoghan Murray
705a03a84e Perf: Avoid creation of intermediary array when iterating over style rules (#1272)
* Perf: Avoid creation of intermediary array when iterating over stylesheet rules by using the second `mapFn` argument of Array.from

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from

Performance analysis by: JonasBA <jonas@badalic.com>
Authored-by: Eoghan Murray <eoghan@getthere.ie>
2026-04-01 12:00:00 +08:00
Eoghan Murray
816d65ec3f Perf: don't run the regex replace unless the selectorText contains a colon (#1280)
* Perf: don't run the regex replace unless the selectorText contains a colon (rules generally contain colons)

* Need to check type before querying selectorText property - also good as it means we only try to fix colons at the leaf level
---------

Authored-by: eoghan murray <eoghan@getthere.ie>
2026-04-01 12:00:00 +08:00
Justin Halsall
515274f22b Make sure CI doesn't trigger updates to yarn.lock files (#1288)
* Make sure CI doesn't trigger updates to yarn.lock files

* Apply formatting changes

* Create cuddly-readers-warn.md

* Apply formatting changes
2026-04-01 12:00:00 +08:00
github-actions[bot]
8f03b3ae2a Version Packages (alpha) (#1286)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Justin Halsall
a6812827e0 Add workaround for Chrome/Edge css import escaping bug (#1287)
* Upgrade to typescript 4.9.5

* Apply formatting changes

* Add workaround for chrome incorrect escaping bug

More info: https://bugs.chromium.org/p/chromium/issues/detail?id=1472259

* Apply formatting changes

* Create itchy-dryers-double.md

* Create rich-jars-remember.md

* Apply formatting changes

* Update packages/rrweb-snapshot/src/css.ts

* Apply formatting changes

* Update packages/rrweb-snapshot/test/__snapshots__/integration.test.ts.snap

* Apply formatting changes

* Update snapshot

* Apply formatting changes

* Rename and refactor fixBrowserCompatibilityIssuesInCSSImports, getCssRulesString and getCssRuleString based on @eoghanmurray feedback

* Apply formatting changes

* Apply formatting changes
2026-04-01 12:00:00 +08:00
Eoghan Murray
6de70cbf21 Extend to run fixBrowserCompatibilityIssuesInCSS over inline stylesheets (#1279)
* Extend to run fixBrowserCompatibilityIssuesInCSS over styles in inline style sheets

* Apply formatting changes

---------

Co-authored-by: eoghanmurray <eoghanmurray@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Yun Feng
26084f9bf7 doc: update sponsor list and company list (#1282)
* doc: update sponsor list and company list

* Apply formatting changes

* Apply formatting changes

* Create khaki-dots-bathe.md

* Apply formatting changes

* Apply formatting changes

---------

Co-authored-by: YunFeng0817 <YunFeng0817@users.noreply.github.com>
Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Sahil Gupta
1abac5c6bf Added requestly in who's using rrweb section (#1278) 2026-04-01 12:00:00 +08:00
github-actions[bot]
d5057c6268 Version Packages (alpha) (#1252)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-01 12:00:00 +08:00