Skip to content

Commit

Permalink
Merge pull request #33 from amplitude/revert-32-revert-22-rrweb-sync-…
Browse files Browse the repository at this point in the history
…alpha-12

Revert "Revert "Rrweb sync alpha 12""
  • Loading branch information
jxiwang authored Oct 16, 2024
2 parents 81feb90 + 3b29f1a commit 0be05c5
Show file tree
Hide file tree
Showing 90 changed files with 3,641 additions and 582 deletions.
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/breezy-mice-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

safely capture BigInt values with the console log plugin"
2 changes: 2 additions & 0 deletions .changeset/cold-hounds-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
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`.
2 changes: 2 additions & 0 deletions .changeset/few-rockets-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/fluffy-planes-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

Feat: Add support for replaying :defined pseudo-class of custom elements
2 changes: 2 additions & 0 deletions .changeset/friendly-numbers-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/gold-apples-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

ref: Avoid unnecessary cloning of objects or arrays
2 changes: 2 additions & 0 deletions .changeset/hip-worms-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/lazy-squids-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

export the canvasMutation function
5 changes: 5 additions & 0 deletions .changeset/lemon-lamps-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

export eventWithTime for consumption by typescript code
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/mighty-bulldogs-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rrweb/web-extension': patch
---

Update `vite.config.ts` to account for all potential entry types.
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`
2 changes: 2 additions & 0 deletions .changeset/silver-windows-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
7 changes: 7 additions & 0 deletions .changeset/smart-ears-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'rrweb-snapshot': patch
---

Feat: Add 'isCustom' flag to serialized elements.

This flag is used to indicate whether the element is a custom element or not. This is useful for replaying the :defined pseudo-class of custom elements.
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.
6 changes: 6 additions & 0 deletions .changeset/smooth-papayas-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'rrweb-snapshot': patch
'rrweb': patch
---

Capture stylesheets designated as `rel="preload"`
5 changes: 5 additions & 0 deletions .changeset/spotty-bees-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrdom': patch
---

fix: scrolling may not be applied when fast-forwarding
6 changes: 6 additions & 0 deletions .changeset/thin-vans-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'rrweb-snapshot': patch
'rrweb': patch
---

Snapshot performance when masking text: Avoid the repeated calls to `closest` when recursing through the DOM
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
5 changes: 5 additions & 0 deletions .changeset/tidy-swans-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rrweb/web-extension': patch
---

🎈 perf(web-extension): conditional check in Player component
5 changes: 5 additions & 0 deletions .changeset/tiny-candles-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rrweb/web-extension': patch
---

🐞 fix(web-extension): typo
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 .changeset/witty-kids-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rrweb/web-extension': patch
---

🐞 fix(web-extension): beforeunload logic
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ module.exports = {
plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'jest', 'compat'],
rules: {
'tsdoc/syntax': 'warn',
'@typescript-eslint/prefer-as-const': 'warn',
},
};
6 changes: 3 additions & 3 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand All @@ -82,7 +82,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: lts/*
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ rrweb refers to 'record and replay the web', which is a tool for recording and r

[**🍳 Recipes 🍳**](./docs/recipes/index.md)

[**📺 Presentation:** Hacking the browser to digital twin your users 📺](https://youtu.be/cWxpp9HwLYw)

## Project Structure

rrweb is mainly composed of 3 parts:
Expand Down Expand Up @@ -138,6 +140,7 @@ In addition to adding integration tests and unit tests, rrweb also provides a RE
alt=""
/>
<br /><sub><b>Yuyz0112</b></sub>
<br /><br />
</a>
</td>
<td align="center">
Expand All @@ -148,6 +151,7 @@ In addition to adding integration tests and unit tests, rrweb also provides a RE
alt=""
/>
<br /><sub><b>Yun Feng</b></sub>
<br /><br />
</a>
</td>
<td align="center">
Expand All @@ -158,6 +162,7 @@ In addition to adding integration tests and unit tests, rrweb also provides a RE
alt=""
/>
<br /><sub><b>eoghanmurray</b></sub>
<br /><br />
</a>
</td>
<td align="center">
Expand All @@ -168,6 +173,7 @@ In addition to adding integration tests and unit tests, rrweb also provides a RE
alt=""
/>
<br /><sub><b>Juice10</b></sub>
<br /><sub>open for rrweb consulting</sub>
</a>
</td>
</tr>
Expand Down Expand Up @@ -226,5 +232,20 @@ In addition to adding integration tests and unit tests, rrweb also provides a RE
<img style="padding: 8px" alt="Intercept, Modify, Record & Replay HTTP Requests." width="195px" src="https://github.com/requestly/requestly/assets/16779465/652552db-c867-44cb-9bb5-94a2026e04ca">
</a>
</td>
<td align="center">
<a href="https://gleap.io" target="_blank">
<img style="padding: 8px" alt="In-app bug reporting & customer feedback platform." width="195px" src="https://assets-global.website-files.com/6506f3f29c68b1724807619d/6506f56010237164c6306591_GleapLogo.svg">
</a>
</td>
<td align="center">
<a href="https://uxwizz.com" target="_blank">
<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>
5 changes: 5 additions & 0 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,10 @@ rrweb 主要由 3 部分组成:
<img style="padding: 8px" alt="Intercept, Modify, Record & Replay HTTP Requests." width="195px" src="https://github.com/requestly/requestly/assets/16779465/652552db-c867-44cb-9bb5-94a2026e04ca">
</a>
</td>
<td align="center">
<a href="https://uxwizz.com" target="_blank">
<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>
</tr>
</table>
2 changes: 1 addition & 1 deletion docs/recipes/export-to-video.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ The event data recorded by rrweb is a performant, easy to compress, text-based f

But if you really need to convert it into a video format, there are some tools that can do this work.

Use [rrvideo](https://github.com/rrweb-io/rrvideo).
Use [rrvideo](https://github.com/rrweb-io/rrweb/blob/master/packages/rrvideo/README.md).
2 changes: 1 addition & 1 deletion docs/recipes/export-to-video.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

rrweb 录制的数据是一种高效、易于压缩的文本格式,可以用于像素级的回放。但如果有进一步将录制数据转换为视频的需求,同样可以通过一些工具实现。

使用 [rrvideo](https://github.com/rrweb-io/rrvideo)
使用 [rrvideo](https://github.com/rrweb-io/rrweb/blob/master/packages/rrvideo/README.zh_CN.md)
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
2 changes: 1 addition & 1 deletion guide.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ setInterval(save, 10 * 1000);
| collectFonts | false | 是否记录页面中的字体文件 |
| userTriggeredOnInput | false | [什么是 `userTriggered`](https://github.com/rrweb-io/rrweb/pull/495) |
| plugins | [] | 加载插件以获得额外的录制功能. [什么是插件?](./docs/recipes/plugin.zh_CN.md) |
| errorHandler | - | 一个可以定制化处理错误的毁掉函数,它的参数是错误对象。如果 rrweb recorder 内部的某些内容抛出错误,则会调用该回调。 |
| errorHandler | - | 一个可以定制化处理错误的回调函数,它的参数是错误对象。如果 rrweb recorder 内部的某些内容抛出错误,则会调用该回调。 |

#### 隐私

Expand Down
Loading

0 comments on commit 0be05c5

Please sign in to comment.