Commit Graph

478 Commits

Author SHA1 Message Date
Justin Halsall
0800f7aa46 Remove userTriggeredOnInput in player config (#633)
The flag is only used on record, not replay
2021-07-14 20:12:28 +08:00
qun
788fb1d5ff Update index.zh_CN.md (#632)
wrongly written characters
2021-07-14 16:37:44 +08:00
Justin Halsall
6ef260089f Add check-types to package.json (#627)
* Add type checking to ci

* Update @types/node to version 12

We are using node 12 on ci

* Add check-types to package.json
2021-07-13 23:46:45 +08:00
Justin Halsall
016ad90973 Add type checking to ci (#626)
* Add type checking to ci

* Update @types/node to version 12

We are using node 12 on ci
2021-07-13 22:31:45 +08:00
Eoghan Murray
9875a3df0b Compact style mutation (#464)
* Don't store the full style attribute change, as small mutations to single style properties result in storage of a rewrite for the full style attribute, which may be very large.

Had an example of a website using http://schillmania.com/projects/snowstorm/ where many direct style changes were happening every second across many 'snowflake' elements, with each attribute change looking like:
"style":"color: rgb(255, 255, 255); position: absolute; width: 8px; height: 8px; font-family: arial, verdana; overflow: hidden; font-weight: normal; z-index: 0; display: block; bottom: auto; opacity: 1; padding: 0px; margin: 0px; font-size: 10px; line-height: 10px; text-align: center; vertical-align: baseline; left: 242.807px; top: 85.7332px;"
even though maybe just the left/top position had been changed

* More compact storage for the much more common attribute value without an `!important` flag - saves 6 chars per style attr in the json :)

* Fix bug: attributes weren't getting removed after changes to treatment of 'style' attributes
2021-07-11 20:04:42 +08:00
Justin Halsall
39c8ba1a24 Buffer modifications to virtual stylesheets (#618)
* Fix sheet insertion

Restore skip duration

Use virtualStyleRulesMap to re-populate stylesheet on Flush event

Clear virtualStyleRulesMap after flush applied

* Support rule deletion in virtual processing

* Simply restoreNodeSheet with early aborts

* 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

* add basic html snapshot functionality

* move restoreNodeSheet to it's own module

* Refactor virtual style rules to buffer changes.
Only applies changes on flush.

`virtualStyleRulesMap` now works with strings instead of CSSRules.
CSSRules can only be via made `.insertRule` on CSSStyleSheet in most browsers.
And `new CSSStyleSheet()` only works in Chrome currently.

* remove unused code

* move VirtualStyleRules from CSSRule to string in tests

* correct paths for tests

* naming

* create and restore style snapshots for virtual nodes

* update replayer snapshot

* move storeCSSRules to virtual-styles.ts

* try/catch access to .sheet in case of access errors

* clean up tests

Co-authored-by: Vladimir Milenko <vladimir.milenko@uber.com>
Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
2021-07-08 22:34:02 +08:00
Justin Halsall
7a0e04c574 Add userTriggered (#495)
* add `userTriggered`

* update snapshots to add userTriggered

* add `userTriggered`

* update snapshots to add userTriggered

* update snapshot to include userTrigger

* only set userTriggered on `userTriggeredOnInput: true`

* What is user triggered?

* correct snapshot

* add second radio to demonstrate userTriggered
2021-07-08 22:27:21 +08:00
Yanzhen Yu
c658ee9e01 Release 1.0.1 2021-07-06 12:13:25 +08:00
Yanzhen Yu
4f08049ad0 add release to github 2021-07-06 12:11:21 +08:00
Eoghan Murray
f99b00eb9d 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
2021-07-06 11:55:52 +08:00
Yanzhen Yu
55f7f4f5d2 Release 1.0.0 2021-07-06 00:25:08 +08:00
Yanzhen Yu
89bbcb3d07 close #489 add v1.0.0 changelog 2021-07-06 00:18:40 +08:00
Yanzhen Yu
dbbb20f5e5 add plugin API recipe 2021-07-05 22:52:57 +08:00
Yanzhen Yu
65a45202d7 update console recipes 2021-07-05 22:38:31 +08:00
Yanzhen Yu
60fd6bf874 update roadmap and remove v1.0 warning 2021-07-04 11:28:25 +08:00
Yanzhen Yu
4def072934 update slack channel link and core team members 2021-07-03 22:34:12 +08:00
Omair Nabiel
67ef7d57cf Update pagination.md (#610)
fix: typo lool to loop
2021-07-02 15:43:41 +08:00
Yanzhen Yu
924c8991da Release 1.0.0-beta.2 2021-07-01 11:22:52 +08:00
Yanzhen Yu
ea48910463 rename console replay plugin 2021-07-01 11:01:42 +08:00
Yanzhen Yu
ab1bc47834 do not bundle es module multiple times 2021-07-01 10:57:54 +08:00
Yanzhen Yu
8082b05254 Release 1.0.0-beta.1 2021-07-01 10:46:47 +08:00
Justin Halsall
ed37401f63 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
2021-06-30 23:26:16 +08:00
Eoghan Murray
c1158d88df Fix an incorrected finish which halted playback prematurely. The scenario was that there were events being rapidly added to the recording. (#606) 2021-06-30 22:39:00 +08:00
Yanzhen Yu
bf8d9d0f89 update yarn.lock 2021-06-30 16:06:46 +08:00
bachmanity1
dee0457ffe add keepIframeSrcFn option (#592)
* rename allowIframe to keepIframeSrcFn

* update rrweb-snapshot to 1.1.5
2021-06-30 11:51:27 +08:00
Yanzhen Yu
b96e9e3632 improve https://github.com/rrweb-io/rrweb-player/issues/12 2021-06-29 17:41:57 +08:00
Justin Halsall
ec08be0241 Docs: update link to list of input values (#604)
* Update url to list of types

* Docs: Update list of inputs (zh_CN)
2021-06-29 16:37:16 +08:00
Justin Halsall
239259cee8 Fixes dist/plugins/console-record.min.js needed for tests #601 (#603) 2021-06-29 00:00:32 +08:00
dependabot[bot]
1ae74b2d04 Bump color-string from 1.5.4 to 1.5.5 (#599)
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/compare/1.5.4...1.5.5)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-28 07:28:10 +08:00
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
Yanzhen Yu
4e025c84ce remove unsed variables 2021-06-25 22:44:20 +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
Yun Feng
1b62620e52 doc: update guide.zh_CN.md 2021-06-23 13:45:12 +08:00
Justin Halsall
fee48f084c Add ability to mask passwords (#494)
* add ability to mask passwords

* remove duplicate mask snapshot

* make sure only one click happens at a time
2021-06-22 19:47:30 +08:00
Yanzhen Yu
c2e042ca6c Release 1.0.0-beta.0 2021-06-20 21:40:16 +08:00
Justin Halsall
8a9212fed4 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>
2021-06-17 21:02:42 +08:00
Yanzhen Yu
069397c2c7 fix registry 2021-06-17 20:25:26 +08:00
Yanzhen Yu
2c90543660 update rrweb-snapshot 2021-06-17 20:19:04 +08:00
yashkumar18
d4d437db37 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>
2021-06-17 17:21:12 +08:00
yashkumar18
ba6666b7f3 Fix order of ternary expression for mouse move source type (#586)
Co-authored-by: Yash Kumar <yashkumar@Yashs-MacBook-Pro-2.local>
2021-06-17 14:57:29 +08:00
Yun Feng
ce74062869 update typings and fix lint errors 2021-06-16 11:40:10 +08:00
Justin Halsall
c59bd710d2 add ability to stop listening 2021-06-16 11:30:16 +08:00
Yakko Majuri
1dd91f0737 Update canvas recording mechanism (#536) 2021-06-10 19:47:19 +08:00
Yanzhen Yu
1062770e20 shadow DOM recording GA
1. record shadow DOM event target by parsing composed path
2. nested record scroll event in shadow DOM
2021-06-10 19:26:00 +08:00
Yanzhen Yu
53699822e4 remove useless log 2021-06-07 09:50:37 +08:00
dependabot[bot]
c25bd2ee85 Bump ws from 6.2.1 to 6.2.2 (#575)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-06 21:52:11 +08:00
dependabot[bot]
cbcd46a5b1 Bump browserslist from 4.14.5 to 4.16.6 (#569)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.14.5 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.14.5...4.16.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-27 09:44:40 +08:00
Yanzhen Yu
28b6ac8bd9 fix mirror usage in shadow DOM manager 2021-05-26 00:21:18 +08:00
Yanzhen Yu
3b20abec2d fix unit test 2021-05-26 00:04:23 +08:00
Yanzhen Yu
995d80a26f create mirror during record 2021-05-25 23:37:07 +08:00