Commit Graph

987 Commits

Author SHA1 Message Date
Mark-fenng
734f70543c Merge branch 'rrweb-player' into monorepo 2021-07-22 18:55:41 +08:00
Mark-fenng
3383dd793a Merge branch 'rrweb-snapshot' into monorepo 2021-07-22 18:13:07 +08:00
Mark-fenng
407c09ed37 moved rrweb-player into packages/rrweb-player 2021-07-22 18:09:32 +08:00
Mark-fenng
bc319d510c moved rrweb-snapshot into packages/rrweb-snapshot 2021-07-22 17:54:51 +08:00
Yanzhen Yu
66e90f51f7 Release 0.7.4 2021-07-21 21:52:43 +08:00
Justin Halsall
7f7810936c Merge pull request #73 from fatihsolhan/patch-1
Add Vue.js version link to readme file
2021-07-21 11:33:28 +02:00
Justin Halsall
c6249c31ae Merge pull request #64 from rrweb-io/dependabot/npm_and_yarn/lodash-4.17.21
Bump lodash from 4.17.19 to 4.17.21
2021-07-21 11:17:14 +02:00
Justin Halsall
4e04bb631e Merge pull request #59 from Juice10/goto-play
Allow goto to specify if it should play or pause
2021-07-21 11:16:54 +02:00
Justin Halsall
fc7d804d6c Merge pull request #63 from Juice10/sourcemaps
Enables Source maps for the library
2021-07-21 11:16:35 +02:00
Justin Halsall
901c272c11 add idRemoved to TreeIndex (#640) 2021-07-19 22:40:43 +08:00
Yanzhen Yu
ca8d9701fa Release 1.0.2 2021-07-19 22:29:20 +08:00
Yanzhen Yu
2e60d42da5 fix typings 2021-07-19 22:21:28 +08:00
Justin Halsall
534a4c1451 Merge branch 'master' into sourcemaps 2021-07-19 15:56:49 +02:00
Eoghan Murray
c45fd2b20a Add more concrete "node not found" warnings (#620)
* Show whether a node was not found because it was never there, or because some other mutation already removed it

* Be more careful applying mutations as replay-stopping things can go wrong, e.g. node removal parent belongs to a different FullSnapshot and has e.g. a text nodeType

* Don't warn when a modified node has been removed in the same mutation - or the parent node for a removed node has been already removed
2021-07-19 18:59:32 +08:00
Yanzhen Yu
6b01f2489b upgrade rrweb-snapshot to 1.1.7
ignore prefetch and preload script links
close #52, #297, #597

Handle quoted strings in data url
2021-07-18 14:08:03 +08:00
yz-yu
ca8317b56f use prettier instead of node-libtidy (#638) 2021-07-18 10:49:16 +08:00
Yanzhen Yu
69cb5dece0 Release 1.1.7 2021-07-17 15:09:00 +08:00
Justin Halsall
7210eaa7b2 yarn typings (#635) 2021-07-15 23:26:43 +08:00
Justin Halsall
eb6b336106 Fixes to #628 to help it pass typescript's type checking (#634)
* My best interpretation of what the typings should look like after merge of #464

* Apply variable name changes as per Juice10 review

Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>

* fix types

Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
2021-07-15 19:39:25 +08:00
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
Yanzhen Yu
47b555a46f ignore prefetch and preload script links
related to:
1. https://github.com/rrweb-io/rrweb/issues/52
2. https://github.com/rrweb-io/rrweb/issues/297
3. https://github.com/rrweb-io/rrweb/issues/597
2021-07-13 22:29:22 +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
AssafKr
10eead6d42 Handle quoted strings in data url (#84)
* handle quoted strings in data url

* unrefactor

* update package json

* Revert "update package json"

This reverts commit 9446109b0f94d9e569a961642f1e57b1a67793ee.

* change background-image to border-image
2021-07-11 16:47:58 +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
8e654595f9 Release 0.7.3 2021-07-06 12:17:27 +08:00
Yanzhen Yu
1f164e3bef upgrade rrweb 2021-07-06 12:15:31 +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
71baf5e7dc Release 0.7.2 2021-07-06 00:31:24 +08:00
Yanzhen Yu
6f17eb3a9d upgrade rrweb 2021-07-06 00:30:50 +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
Yanzhen Yu
583db22016 Release 1.1.6 2021-06-30 22:42:47 +08:00
Justin Halsall
775291042d move maskInputValue to rrweb-snapshot (#83)
More info: https://github.com/rrweb-io/rrweb/pull/602#discussion_r660434998
2021-06-30 22:41:37 +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