Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: safe pause #1

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/breezy-cats-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

fix: createImageBitmap throws DOMException if source is 0 width or height
5 changes: 5 additions & 0 deletions .changeset/cool-grapes-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrdom': patch
---

Support `loop` in `RRMediaElement`
5 changes: 5 additions & 0 deletions .changeset/dirty-rules-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb-snapshot': minor
---

Video and Audio elements now also capture `playbackRate`, `muted`, `loop`, `volume`.
5 changes: 5 additions & 0 deletions .changeset/event-single-wrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

perf: Avoid an extra function call and object clone during event emission
2 changes: 2 additions & 0 deletions .changeset/light-fireants-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/mighty-ads-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': minor
---

Full overhawl of `video` and `audio` element playback. More robust and fixes lots of bugs related to pausing/playing/skipping/muting/playbackRate etc.
5 changes: 5 additions & 0 deletions .changeset/modern-doors-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb-snapshot': patch
---

better nested css selector splitting when commas or brackets happen to be in quoted text
37 changes: 37 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,64 +14,101 @@
"changesets": [
"attribute-text-reductions",
"brave-numbers-joke",
"breezy-cats-heal",
"breezy-mice-breathe",
"calm-bulldogs-speak",
"calm-oranges-sin",
"chatty-cherries-train",
"clean-plants-play",
"clean-shrimps-lay",
"cold-eyes-hunt",
"cold-hounds-teach",
"controller-finish-flag",
"cool-grapes-hug",
"cuddly-readers-warn",
"curvy-apples-lay",
"date-now-guard",
"dirty-rules-dress",
"eight-terms-hunt",
"empty-bikes-cheer",
"fair-dragons-greet",
"fast-chefs-smell",
"few-rockets-travel",
"few-turkeys-reflect",
"five-peas-lay",
"fluffy-planes-retire",
"forty-elephants-attack",
"fresh-cars-impress",
"fresh-spoons-drive",
"friendly-numbers-leave",
"gold-apples-joke",
"gold-terms-look",
"grumpy-ways-own",
"hip-worms-relax",
"itchy-dryers-double",
"khaki-dots-bathe",
"large-ants-prove",
"lazy-squids-draw",
"lazy-toes-confess",
"lemon-lamps-switch",
"light-fireants-exercise",
"little-radios-thank",
"little-suits-leave",
"loud-seals-raise",
"lovely-pears-cross",
"lovely-students-boil",
"mean-tips-impress",
"mighty-ads-worry",
"mighty-bulldogs-begin",
"mighty-frogs-sparkle",
"moody-dots-refuse",
"nervous-buses-pump",
"nervous-mirrors-perform",
"nervous-poets-grin",
"nervous-tables-travel",
"new-snakes-call",
"nice-pugs-reply",
"old-dryers-hide",
"polite-olives-wave",
"pretty-plums-rescue",
"pretty-schools-remember",
"proud-experts-jam",
"rare-adults-sneeze",
"real-masks-explode",
"real-trains-switch",
"rich-crews-protect",
"rich-dots-lay",
"rich-jars-remember",
"rotten-spies-enjoy",
"serious-ants-juggle",
"silver-pots-sit",
"silver-windows-float",
"sixty-impalas-laugh",
"small-olives-arrive",
"smart-ears-refuse",
"smart-geckos-cover",
"smooth-papayas-boil",
"smooth-poems-bake",
"spotty-bees-destroy",
"stupid-ghosts-help",
"swift-dancers-rest",
"swift-peas-film",
"thin-vans-applaud",
"thirty-baboons-punch",
"three-baboons-bow",
"tidy-swans-repair",
"tidy-yaks-joke",
"tiny-buckets-love",
"tiny-candles-whisper",
"tiny-chairs-build",
"tricky-panthers-guess",
"twenty-goats-kneel",
"twenty-lies-switch",
"twenty-planets-repeat",
"violet-melons-itch",
"violet-zebras-cry",
"wise-spiders-jog",
"witty-kids-talk",
"yellow-mails-cheat",
"young-timers-grow"
]
Expand Down
5 changes: 5 additions & 0 deletions .changeset/rich-dots-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb-snapshot': patch
---

Fix css parsing errors
7 changes: 7 additions & 0 deletions .changeset/rotten-spies-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'rrweb-snapshot': patch
'rrweb': patch
---

Ensure :hover works on replayer, even if a rule is behind a media query
Respect the intent behind max-device-width and min-device-width media queries so that their effects are apparent in the replayer context
5 changes: 5 additions & 0 deletions .changeset/safe-pause.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

fix: safe pause
5 changes: 5 additions & 0 deletions .changeset/silver-pots-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rrweb/types': patch
---

Add `loop` to `mediaInteractionParam`
5 changes: 5 additions & 0 deletions .changeset/smart-geckos-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

Record `loop` on `<audio>` & `<video>` elements.
5 changes: 5 additions & 0 deletions .changeset/three-baboons-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

fix: protect against missing parentNode
2 changes: 2 additions & 0 deletions .changeset/twenty-goats-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/wise-spiders-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rrweb/types': patch
---

Fix type error when using `"moduleResolution": "NodeNext"`.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,5 +242,10 @@ In addition to adding integration tests and unit tests, rrweb also provides a RE
<img style="padding: 8px" alt="Self-hosted website analytics with heatmaps and session recordings." width="195px" src="https://github.com/UXWizz/public-files/raw/main/assets/logo.png">
</a>
</td>
<td align="center">
<a href="https://www.howdygo.com" target="_blank">
<img style="padding: 8px" alt="Interactive product demos for small marketing teams" width="195px" src="https://assets-global.website-files.com/650afb446f1dd5bd410f00cc/650b2cec6188ff54dd9b01e1_Logo.svg">
</a>
</td>
</tr>
</table>
41 changes: 21 additions & 20 deletions guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,26 +295,27 @@ replayer.destroy();

The replayer accepts options as its constructor's second parameter, and it has the following options:

| key | default | description |
| ------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| speed | 1 | replay speed ratio |
| root | document.body | the root element of replayer |
| loadTimeout | 0 | timeout of loading remote style sheet |
| skipInactive | false | whether to skip inactive time |
| showWarning | true | whether to print warning messages during replay |
| showDebug | false | whether to print debug messages during replay |
| blockClass | 'rr-block' | element with the class name will display as a blocked area |
| liveMode | false | whether to enable live mode |
| insertStyleRules | [] | accepts multiple CSS rule string, which will be injected into the replay iframe |
| triggerFocus | true | whether to trigger focus during replay |
| UNSAFE_replayCanvas | false | whether to replay the canvas element. **Enable this will remove the sandbox, which is unsafe.** |
| pauseAnimation | true | whether to pause CSS animation when the replayer is paused |
| mouseTail | true | whether to show mouse tail during replay. Set to false to disable mouse tail. A complete config can be found in this [type](https://github.com/rrweb-io/rrweb/blob/9488deb6d54a5f04350c063d942da5e96ab74075/src/types.ts#L407) |
| unpackFn | - | refer to the [storage optimization recipe](./docs/recipes/optimize-storage.md) |
| logConfig | - | configuration of console output playback, refer to the [console recipe](./docs/recipes/console.md) |
| plugins | [] | load plugins to provide extended replay functions. [What is plugins?](./docs/recipes/plugin.md) |
| useVirtualDom | true | whether to use Virtual Dom optimization in the process of skipping to a new point of time |
| logger | console | The logger object used by the replayer to print warnings or errors |
| key | default | description |
| ----------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| speed | 1 | replay speed ratio |
| root | document.body | the root element of replayer |
| loadTimeout | 0 | timeout of loading remote style sheet |
| skipInactive | false | whether to skip inactive time |
| inactivePeriodThreshold | 10000 | the threshold in milliseconds for what should be considered an inactive period |
| showWarning | true | whether to print warning messages during replay |
| showDebug | false | whether to print debug messages during replay |
| blockClass | 'rr-block' | element with the class name will display as a blocked area |
| liveMode | false | whether to enable live mode |
| insertStyleRules | [] | accepts multiple CSS rule string, which will be injected into the replay iframe |
| triggerFocus | true | whether to trigger focus during replay |
| UNSAFE_replayCanvas | false | whether to replay the canvas element. **Enable this will remove the sandbox, which is unsafe.** |
| pauseAnimation | true | whether to pause CSS animation when the replayer is paused |
| mouseTail | true | whether to show mouse tail during replay. Set to false to disable mouse tail. A complete config can be found in this [type](https://github.com/rrweb-io/rrweb/blob/9488deb6d54a5f04350c063d942da5e96ab74075/src/types.ts#L407) |
| unpackFn | - | refer to the [storage optimization recipe](./docs/recipes/optimize-storage.md) |
| logConfig | - | configuration of console output playback, refer to the [console recipe](./docs/recipes/console.md) |
| plugins | [] | load plugins to provide extended replay functions. [What is plugins?](./docs/recipes/plugin.md) |
| useVirtualDom | true | whether to use Virtual Dom optimization in the process of skipping to a new point of time |
| logger | console | The logger object used by the replayer to print warnings or errors |

#### Use rrweb-player

Expand Down
16 changes: 16 additions & 0 deletions packages/rrdom-nodejs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# rrdom-nodejs

## 2.0.0-alpha.13

### Patch Changes

- Updated dependencies [[`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`f7c6973`](https://github.com/rrweb-io/rrweb/commit/f7c6973ae9c21b9ea014bdef7101f976f04d9356)]:
- rrdom@2.0.0-alpha.13
- rrweb-snapshot@2.0.0-alpha.13

## 2.0.0-alpha.12

### Patch Changes

- Updated dependencies [[`58c9104`](https://github.com/rrweb-io/rrweb/commit/58c9104eddc8b7994a067a97daae5684e42f892f), [`a2be77b`](https://github.com/rrweb-io/rrweb/commit/a2be77b82826c4be0e7f3c7c9f7ee50476d5f6f8), [`a7c33f2`](https://github.com/rrweb-io/rrweb/commit/a7c33f2093c4d92faf7ae25e8bb0e088d122c13b), [`8aea5b0`](https://github.com/rrweb-io/rrweb/commit/8aea5b00a4dfe5a6f59bd2ae72bb624f45e51e81), [`314a8dd`](https://github.com/rrweb-io/rrweb/commit/314a8dde5a13095873b89d07bac7c949918bf817), [`e607e83`](https://github.com/rrweb-io/rrweb/commit/e607e83b21d45131a56c1ff606e9519a5b475fc1), [`7c0dc9d`](https://github.com/rrweb-io/rrweb/commit/7c0dc9dfe1564c9d6624557c5b394e7844955882), [`07ac5c9`](https://github.com/rrweb-io/rrweb/commit/07ac5c9e1371824ec3ffb705f9250bbe10f4b73e)]:
- rrweb-snapshot@2.0.0-alpha.12
- rrdom@2.0.0-alpha.12

## 2.0.0-alpha.11

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/rrdom-nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rrdom-nodejs",
"version": "2.0.0-alpha.11",
"version": "2.0.0-alpha.13",
"scripts": {
"dev": "rollup -c -w",
"bundle": "rollup --config",
Expand Down Expand Up @@ -48,8 +48,8 @@
"cssom": "^0.5.0",
"cssstyle": "^2.3.0",
"nwsapi": "^2.2.0",
"rrdom": "^2.0.0-alpha.11",
"rrweb-snapshot": "^2.0.0-alpha.11"
"rrdom": "^2.0.0-alpha.13",
"rrweb-snapshot": "^2.0.0-alpha.13"
},
"browserslist": [
"supports es6-class"
Expand Down
18 changes: 18 additions & 0 deletions packages/rrdom/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# rrdom

## 2.0.0-alpha.13

### Patch Changes

- [#1432](https://github.com/rrweb-io/rrweb/pull/1432) [`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961) Thanks [@Juice10](https://github.com/Juice10)! - Support `loop` in `RRMediaElement`

- Updated dependencies [[`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`f7c6973`](https://github.com/rrweb-io/rrweb/commit/f7c6973ae9c21b9ea014bdef7101f976f04d9356)]:
- rrweb-snapshot@2.0.0-alpha.13

## 2.0.0-alpha.12

### Patch Changes

- [#1352](https://github.com/rrweb-io/rrweb/pull/1352) [`e607e83`](https://github.com/rrweb-io/rrweb/commit/e607e83b21d45131a56c1ff606e9519a5b475fc1) Thanks [@juliecheng](https://github.com/juliecheng)! - fix: scrolling may not be applied when fast-forwarding

- Updated dependencies [[`58c9104`](https://github.com/rrweb-io/rrweb/commit/58c9104eddc8b7994a067a97daae5684e42f892f), [`a2be77b`](https://github.com/rrweb-io/rrweb/commit/a2be77b82826c4be0e7f3c7c9f7ee50476d5f6f8), [`a7c33f2`](https://github.com/rrweb-io/rrweb/commit/a7c33f2093c4d92faf7ae25e8bb0e088d122c13b), [`8aea5b0`](https://github.com/rrweb-io/rrweb/commit/8aea5b00a4dfe5a6f59bd2ae72bb624f45e51e81), [`314a8dd`](https://github.com/rrweb-io/rrweb/commit/314a8dde5a13095873b89d07bac7c949918bf817), [`7c0dc9d`](https://github.com/rrweb-io/rrweb/commit/7c0dc9dfe1564c9d6624557c5b394e7844955882), [`07ac5c9`](https://github.com/rrweb-io/rrweb/commit/07ac5c9e1371824ec3ffb705f9250bbe10f4b73e)]:
- rrweb-snapshot@2.0.0-alpha.12

## 2.0.0-alpha.11

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/rrdom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rrdom",
"version": "2.0.0-alpha.11",
"version": "2.0.0-alpha.13",
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/rrdom#readme",
"license": "MIT",
"main": "lib/rrdom.cjs",
Expand Down Expand Up @@ -32,7 +32,7 @@
},
"devDependencies": {
"@rollup/plugin-commonjs": "^20.0.0",
"@rrweb/types": "^2.0.0-alpha.11",
"@rrweb/types": "^2.0.0-alpha.13",
"@types/jest": "^27.4.1",
"@types/puppeteer": "^5.4.4",
"@typescript-eslint/eslint-plugin": "^5.23.0",
Expand All @@ -47,6 +47,6 @@
"ts-jest": "^27.1.3"
},
"dependencies": {
"rrweb-snapshot": "^2.0.0-alpha.11"
"rrweb-snapshot": "^2.0.0-alpha.13"
}
}
Loading