Commit Graph

265 Commits

Author SHA1 Message Date
Eoghan Murray
fb381a1254 Ignore firstFullSnapshot once only after initial 'poster' build (#608)
* Encountered a bug where firstFullSnapshot was played twice because timer was immediately started and reached the snapshot before the setTimeout returned

* Ignoring a FullSnapshot needs to be a one-time only thing, as otherwise we'll ignore it after scrubbing (restarting play head at a particular time). This is a problem if mutations have altered the player state, and we try to replay those mutations, so we e.g. try to remove an element that has already been removed because we haven't reset the FullSnapshot state

* Some `npm run typings` related fixups
2026-04-01 12:00:00 +08:00
Yanzhen Yu
ed46394562 rename console replay plugin 2026-04-01 12:00:00 +08:00
Justin Halsall
4dcd674e34 Mask value attribute changes for elements in maskInputOptions (#602)
* mask value attribute changes for elements in maskInputOptions

* refactor initInputObserver to use maskInputValue

* add todo

* Fix typo

* upgrade rrweb-snapshot to 1.1.6

* move maskInputValue to rrweb-snapshot
2026-04-01 12:00:00 +08:00
Eoghan Murray
38a9e36b8f Fix an incorrected finish which halted playback prematurely. The scenario was that there were events being rapidly added to the recording. (#606) 2026-04-01 12:00:00 +08:00
bachmanity1
059d492bea add keepIframeSrcFn option (#592)
* rename allowIframe to keepIframeSrcFn

* update rrweb-snapshot to 1.1.5
2026-04-01 12:00:00 +08:00
yz-yu
c550a4b088 plugin API (#598)
* temp: plugin API

* fix a bug in the replay handler and rename some type names.

* update integration test

* improve plugin types and handle legacy log data

* use different naming in record and replay bundles

* delete unreferenced types

Co-authored-by: Lucky Feng <294889365@qq.com>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
e7583f71b2 remove unsed variables 2026-04-01 12:00:00 +08:00
bachmanity1
6de0efa01f implement video seek feature (#593)
* implement video seek feature

* rm attribute from MediaInteractions

* resolve ts warning

* use getEventTarget
2026-04-01 12:00:00 +08:00
Justin Halsall
a4426d2927 Add ability to mask passwords (#494)
* add ability to mask passwords

* remove duplicate mask snapshot

* make sure only one click happens at a time
2026-04-01 12:00:00 +08:00
Justin Halsall
80e7307729 Tests: Iframe event order (#568)
* add failing test

* assert order of events

* defer attaching of iframe till FullSnapshot is done
Fixes: https://github.com/rrweb-io/rrweb/issues/567

* correct event order in iframe integration test snapshot

* trigger build

* trigger build

* Move settimeout responsibility to snapshot
https://github.com/rrweb-io/rrweb-snapshot/pull/78

* upgrade rrweb-snapshot to 1.1.4

* DRY record tests

* cleanup

* Upgrade puppeteer to 9.1.1
for (hopefully) more consistent behaviour between CI and development

* make input bigger to prevent triggering scroll events

* page.waitFor is deprecated
more info: https://github.com/puppeteer/puppeteer/issues/6214

* Set os and distro for Travis ci

Co-authored-by: yz-yu <yanzhen@smartx.com>
2026-04-01 12:00:00 +08:00
yashkumar18
a19893cdfa Handle Drag events in replayer (#587)
* Handle Drag events in replayer

* add touch move source as well

Co-authored-by: Yash Kumar <yashkumar@Yashs-MacBook-Pro-2.local>
2026-04-01 12:00:00 +08:00
yashkumar18
1539d35039 Fix order of ternary expression for mouse move source type (#586)
Co-authored-by: Yash Kumar <yashkumar@Yashs-MacBook-Pro-2.local>
2026-04-01 12:00:00 +08:00
Yun Feng
0235cd4d0a update typings and fix lint errors 2026-04-01 12:00:00 +08:00
Justin Halsall
e00ca2cbd9 add ability to stop listening 2026-04-01 12:00:00 +08:00
Yakko Majuri
ba33720104 Update canvas recording mechanism (#536) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
c581cf68ca shadow DOM recording GA
1. record shadow DOM event target by parsing composed path
2. nested record scroll event in shadow DOM
2026-04-01 12:00:00 +08:00
Yanzhen Yu
24d65c7cb1 remove useless log 2026-04-01 12:00:00 +08:00
Yanzhen Yu
fd88a950a9 fix mirror usage in shadow DOM manager 2026-04-01 12:00:00 +08:00
Yanzhen Yu
222063ae48 fix unit test 2026-04-01 12:00:00 +08:00
Yanzhen Yu
b693d667b5 create mirror during record 2026-04-01 12:00:00 +08:00
Yanzhen Yu
e9784a20cb fix #565 add departed warning 2026-04-01 12:00:00 +08:00
Yanzhen Yu
37c293c4bd fix useless code introduced by resolving conflicts 2026-04-01 12:00:00 +08:00
Ziqiu Zhao
394d94e6c7 feature: make mirror independent in Replayer (#407)
Co-authored-by: zhaoziqiu <zhaoziqiu@meituan.com>
Co-authored-by: yz-yu <yanzhen@smartx.com>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
bdb269b138 fix #524 polyfill Node.prototype.contains 2026-04-01 12:00:00 +08:00
Lucky Feng
b30b37c889 fix: #542 wrong results of splitting log stacks (#547)
fix bug of stack parcer and increase compatibility for different browser vendors
2026-04-01 12:00:00 +08:00
Lucky Feng
424044ede3 fix: issue #548 (#550)
1. Do not use virtual parent optimization if the mutation targets have iframe elements as children. This will cause some performance regression but will be easy to add and ship.
2. If an iframe element has already been a child of a virtual parent, add the virtual parent back to the dom.
2026-04-01 12:00:00 +08:00
Yanzhen Yu
f0c2258371 check events cursor before comparing timestamp 2026-04-01 12:00:00 +08:00
re-fort
b1b25447ff Add options to mask texts (#540)
* feat: add options to mask texts

* feat: add the default mask function

* refactor: rename options to identify the difference between  mask text and mask input

* test: add tests about masking

* doc: add options about masking

* chore: bump up rrweb-snapshot version
2026-04-01 12:00:00 +08:00
Yanzhen Yu
861fac54ea fix #535 add play-back event to reset mirror and replayer 2026-04-01 12:00:00 +08:00
Yanzhen Yu
fdfb160e76 call sort after unpack 2026-04-01 12:00:00 +08:00
Eoghan Murray
cfe59cb4b4 Sort events upon creation, and keep ordered (#411)
* Sort events at start, as otherwise we risk misidentifying the last event

* Keep inserted events in the correct order, ensuring we don't misidentify the last event

 - e.g. network conditions mean that 'live' events come in non-sequentially
 - or so that adding custom events to an existing event works

* Ensure we maintain original ordering while inserting a new event which has an identical timestamp to an existing event. This came up with a series of mutations which had the same timestamp but needed to be applied in the correct order

* Fast track the common case of a new event being added which occurs after all prior events
2026-04-01 12:00:00 +08:00
Eoghan Murray
d4a5284bb1 Don't perform newly added actions if player is paused (#539) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
0223ff1c08 fix first play check 2026-04-01 12:00:00 +08:00
Yanzhen Yu
f555baa4ac impl #530, observe drag event and replay as mousemove 2026-04-01 12:00:00 +08:00
John Pham
a295f72ed0 Don't rebuildFullSnapshot if it's the first run (#532)
* Don't rebuildFullSnapshot if it's the first run

* Fix typo
2026-04-01 12:00:00 +08:00
Yanzhen Yu
3e8cacbb95 fix #531 use getRootNode with precheck 2026-04-01 12:00:00 +08:00
Yanzhen Yu
0e688bba0c impl shadow DOM manager
part of #38
1. observe DOM mutations in shadow DOM
2. rebuild DOM mutations in shadow DOM
2026-04-01 12:00:00 +08:00
Lucky Feng
66c7c8f028 fix: inaccurate mouse position (#522)
1. Position of mouse was inaccurate when replaying and this PR will fix it.
2. Fix the bug that if one nested iframe has a scale transform and the position of mouse was inaccurate as well.
2026-04-01 12:00:00 +08:00
Lucky Feng
016a5020fc fix: errors of replaying iframe records (#520)
* fix: errors of replaying iframe records

error1:
HierarchyRequestError: Failed to execute 'appendChild' on 'Node': Nodes of type '#document' may not be inserted inside nodes of type '#document-fragment'.
code: parent.appendChild(target)

error2:
Uncaught DOMException: Failed to execute 'appendChild' on 'Node': Only one element on document allowed.
code: parent.appendChild(target);

* improve the comment for bugfix
2026-04-01 12:00:00 +08:00
Yakko Majuri
fcbc0e4b43 Handle event undefined in initMoveObserver (#515) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
b621011c56 add an experiment config to set max speed in fast forward 2026-04-01 12:00:00 +08:00
Yanzhen Yu
5e42ddc1cb impl #507 export takeFullSnapshot as a public API 2026-04-01 12:00:00 +08:00
Yanzhen Yu
2ee3926f25 fix lint errors 2026-04-01 12:00:00 +08:00
Yanzhen Yu
4ed82274ae close #491 check whether link node is head 2026-04-01 12:00:00 +08:00
Yanzhen Yu
36d52f8faf close #501 do not count attach iframe event in checkout 2026-04-01 12:00:00 +08:00
Province Innovation
eeac998959 Added mousemoveCallback threshold option to sampling config. (#492)
* Added mousemoveCallback threshold option to sampling config.

* Added mousemoveCallback to definitions file.
2026-04-01 12:00:00 +08:00
Yanzhen Yu
ab819bf338 start impl rrdom 2026-04-01 12:00:00 +08:00
Eoghan Murray
27bc40ac03 remove debugging warning (#486)
I can't see a reason for the warning here so believe it's a debugging statement that crept in?
2026-04-01 12:00:00 +08:00
yz-yu
33f0ac5cfe Impl record iframe (#481)
* Impl record iframe

* iframe observe

* temp: add bundle file to git

* update bundle

* update with pick

* update bundle

* fix fragment map remove

* feat: add an option to determine whether to pause CSS animation when playback is paused (#428)

set pauseAnimation to true by default

* fix: elements would lose some states like scroll position because of "virtual parent" optimization (#427)

* fix: elements would lose some state like scroll position because of "virtual parent" optimization

* refactor: the bugfix code

bug: elements would lose some state like scroll position because of "virtual parent" optimization

* fix: an error occured at applyMutation(remove nodes part)

error message:
Uncaught (in promise) DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node

* pick fixes

* revert ignore file

* re-impl iframe record

* re-impl iframe replay

* code housekeeping

* move multi layer dimension calculation to replay side

* update test cases

* teardown test server

* upgrade rrweb-snapshot with iframe load timeout

Co-authored-by: Lucky Feng <yun.feng@smartx.com>
2026-04-01 12:00:00 +08:00
Karl-Aksel Puulmann
b99e843e2a Fix RangeError: Maximum call stack size exceeded (#479)
Saw this line cause issues in production, causing the following error:

```
RangeError Maximum call stack size exceeded
```

I believe this is caused by javascript engine max argument length - see note from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply#using_apply_and_built-in_functions

> The consequences of applying a function with too many arguments (that is, more than tens of thousands of arguments) varies across engines. (The JavaScriptCore engine has hard-coded argument limit of 65536.
2026-04-01 12:00:00 +08:00