Commit Graph

42 Commits

Author SHA1 Message Date
yz-yu
5fc6c193fd 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>
2021-06-28 00:09:09 +08:00
bachmanity1
dbaea7a521 implement video seek feature (#593)
* implement video seek feature

* rm attribute from MediaInteractions

* resolve ts warning

* use getEventTarget
2021-06-24 18:28:14 +08:00
Yanzhen Yu
995d80a26f create mirror during record 2021-05-25 23:37:07 +08:00
Yanzhen Yu
ed990536bc update typings file 2021-04-23 18:40:23 +08:00
re-fort
18ad3dae1a 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
2021-04-22 16:03:52 +08:00
Lucky Feng
e3f9a4d205 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.
2021-03-25 10:29:49 +08:00
Province Innovation
75e4a0c1ff Added mousemoveCallback threshold option to sampling config. (#492)
* Added mousemoveCallback threshold option to sampling config.

* Added mousemoveCallback to definitions file.
2021-02-19 11:56:12 +08:00
yz-yu
f3d7fa3451 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>
2021-02-10 21:44:25 +08:00
Yanzhen Yu
d76e4753f4 Release 0.9.12 2021-01-02 14:59:05 +08:00
Lucky Feng
4e7146e72b feat: enable rrweb to record and replay log messages in console (#424)
* wip: working on rrweb logger

* wip: can record and replay some simple log

* wip: can record and replay log's stack

* wip: try to serialize object

* wip: record and replay console logger

hijack all of the console functions.
add listener to thrown errors

* wip: record and replay console logger
add limit to the max number of log records

* feat: enable rrweb to record and replay log messages in console

this is the implementation of new feature request(issue #234)

here are a few points of description.
1. users need to set recordLog option in rrweb.record's parameter to record log messages.  The log recorder is off by default.
2. support recording and replaying all kinds of console functions. But the reliability of them should be tested more
3. the stringify function in  stringify.ts needs improvement. e.g. robustness, handler for cyclical structures and better support for more kinds of object
4. we can replay the log messages in a simulated html console like LogRocket by implementing the interface "ReplayLogger" in the future

* improve: the stringify function

1. handle cyclical structures
2. add stringify option to limit the length of result
3. handle function type

* refactor: simplify the type definition of ReplayLogger
2020-11-29 18:12:03 +08:00
Yanzhen Yu
23a1883dfc pick #286 allow short cut for slim DOM options 2020-11-29 14:54:05 +08:00
Yanzhen Yu
48edcfbdee Release 0.9.10 2020-11-29 14:41:22 +08:00
Lucky Feng
96e4bfdddd 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
2020-11-27 17:46:52 +08:00
Lucky Feng
658999c6e0 feat: add an option to determine whether to pause CSS animation when playback is paused (#428)
set pauseAnimation to true by default
2020-11-27 16:16:18 +08:00
Yanzhen Yu
c9391a9c92 Release 0.9.5 2020-09-20 14:16:29 +08:00
Yanzhen Yu
52e257627d Release 0.9.2 2020-09-07 22:02:27 +08:00
Yanzhen Yu
41690c755c close #330 implement more accurate finish event 2020-09-07 21:59:57 +08:00
Yanzhen Yu
c8094c33dc Release 0.9.1 2020-09-07 09:47:17 +08:00
Yanzhen Yu
a90999d96e close #274 implement the new state management proposal 2020-08-08 17:07:37 +08:00
Yanzhen Yu
6f08ec3ca7 add the patch function to utils 2020-07-18 16:56:22 +08:00
Yanzhen Yu
7feb2c945c update typescript to 3.9.5 2020-06-12 18:32:48 +08:00
Eoghan Murray
8766335c82 Move mutation processing into it's own class (#223)
* Move mutation processing into it's own object.

This should stand on it's own as a refactor, but is intended as a basis
for exposing the new MutationBuffer object to further outside control e.g.
to 'mute' or batch up mutation emission when the page becomes inactive
from a https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
point of view

* The `processMutations` function needed to be bound to the `mutationBuffer` object, as otherwise `this` referred to the `MutationObserver` object itself

* Neglected to add this output of `npm run typings`

* Get around the binding problem by using Arrow function expressions

* Prettier formatting
2020-06-06 18:33:58 +08:00
yz-yu
4f36d0e57d Packer (#172)
* introduce pako and add general packer interface

* add tests for packer

* use function API instead of class API for better tree shaking support

* refcatoring the rollup bundle config
2020-04-07 18:03:47 +08:00
Yanzhen Yu
69094081ea Release 0.7.29 2020-02-28 19:52:06 +08:00
Yanzhen Yu
fa4b4299e7 Release 0.7.28 2020-02-26 09:58:36 +08:00
Yanzhen Yu
bf2142cb60 Release 0.7.27 2019-11-24 22:39:34 +08:00
yz-yu
b64e1492ab add hooks API (#132) 2019-09-17 23:33:38 +08:00
Yanzhen Yu
dbcf03e415 Release 0.7.20 2019-08-10 17:32:24 +08:00
Yanzhen Yu
7f32fbdd05 Release 0.7.19 2019-08-04 14:53:42 +08:00
肉肉肉肉
b569b84794 new feature: add custom style in replayer (#87)
* new feature: add custom style in replayer

* concat style rules for loop
2019-07-10 12:33:54 +08:00
Yanzhen Yu
a255387230 Release 0.7.17 2019-06-22 23:03:49 +08:00
Sebastian Jakob
189df87b9d Option to mask inputs (#80)
* Option to mask inputs

Added option 'maskAllInputs' to replace all user inputs with an Asterisk.

* Update types.d.ts
2019-06-15 12:52:08 +08:00
Yanzhen Yu
d32b31f3e3 remove mitt typings namesapce 2019-06-05 17:33:20 +08:00
yz-yu
2398f5c0b1 start to support live mode (#73)
1. add a liveMode flag to config, when liveMode is set, the timer
will keep running even though all the actions casted
2. add a public method addEvent, which will cast newly added event
in sync
3. move mouse in sync mode with the latest position info
2019-05-26 16:02:52 +08:00
Yanzhen Yu
e8de7435eb Release 0.7.13 2019-05-12 21:10:52 +08:00
Yanzhen Yu
2d8d4b0c19 fix #62 accept RegExp type block class config 2019-04-14 16:11:54 +08:00
Yanzhen Yu
faed623986 resume with time offset when after wait stylesheet load 2019-04-09 17:00:02 +08:00
Yanzhen Yu
8e90801daf Release 0.7.10 2019-04-02 13:38:38 +08:00
Yanzhen Yu
65fd31487c Release 0.7.9 2019-02-08 09:09:23 +08:00
Yanzhen Yu
3ce4c76e60 Release 0.7.8 2019-01-25 18:26:16 +08:00
Yanzhen Yu
6abf4fd4a0 move all events to an enum and update guide 2019-01-25 17:18:51 +08:00
yz-yu
128deca040 update dependencies and generate typings (#44) 2019-01-21 19:54:21 +08:00