* 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>
* 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
* 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>
* 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
* 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>
* record canvas mutations
close#60, #261
This patch implements the canvas mutation observer.
It consists of both the record and the replay side changes.
In the record side, we add a `recordCanvas` flag to indicate
whether to record canvas elements and the flag defaults to false.
Different from our other observers, the canvas observer was
disabled by default. Because some applications with heavy canvas
usage may emit a lot of data as canvas changed, especially the
scenarios that use a lot of `drawImage` API.
So the behavior should be audited by users and only record canvas
when the flag was set to true.
In the replay side, we add a `UNSAFE_replayCanvas` flag to indicate
whether to replay canvas mutations.
Similar to the `recordCanvas` flag, `UNSAFE_replayCanvas` defaults
to false. But unlike the record canvas implementation is stable and
safe, the replay canvas implementation is UNSAFE.
It's unsafe because we need to add `allow-scripts` to the replay
sandbox, which may cause some unexpected script execution. Currently,
users should be aware of this implementation detail and enable this
feature carefully.
* update canvas integration test
* part of #80, support mask input options
* close#188 enhance sampling options
Use a more general sampling strategy interface to describe the
configuration of sampling events collection.
Implemented mousmove, mouse interaction, scroll and input sampling
strategy.