Skip to content
Open
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
14 changes: 12 additions & 2 deletions guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Installation

### Direct `<script>` include
### Option 1: Direct `<script>` include

You are recommended to install rrweb via jsdelivr's CDN service:

Expand All @@ -24,6 +24,16 @@ Also, you can link to a specific version number that you can update manually:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/rrweb.umd.min.cjs"></script>
```

If the above versions are not supported, you can try previous versions, such as:

```html
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/rrweb.min.css"
/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/rrweb.min.js"></script>
```

#### Only include the recorder code

rrweb's code includes both the record and the replay parts. Most of the time you only need to include the record part into your targeted web Apps.
Expand Down Expand Up @@ -57,7 +67,7 @@ Besides the `rrweb` and `@rrweb/record` packages, rrweb also provides other pack
- [@rrweb/rrweb-plugin-canvas-webrtc-record](packages/plugins/rrweb-plugin-canvas-webrtc-record): A plugin for stream `<canvas>` via WebRTC.
- [@rrweb/rrweb-plugin-canvas-webrtc-replay](packages/plugins/rrweb-plugin-canvas-webrtc-replay): A plugin for playing streamed `<canvas>` via WebRTC.

### NPM
### Option 2: NPM

```shell
npm install --save rrweb
Expand Down
14 changes: 12 additions & 2 deletions guide.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 安装

### 直接通过 `<script>` 引入
### 选项一:直接通过 `<script>` 引入

推荐通过 jsdelivr 的 CDN 安装:

Expand All @@ -22,6 +22,16 @@
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/rrweb.umd.min.cjs"></script>
```

若以上版本不支持,可以尝试之前的版本,例如:

```html
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/rrweb.min.css"
/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/rrweb.min.js"></script>
```

#### 仅引入录制部分

rrweb 代码分为录制和回放两部分,大多数时候用户在被录制的应用中只需要引入录制部分代码。同样可以通过使用 @rrweb/record 包和 CDN 服务来实现:
Expand Down Expand Up @@ -54,7 +64,7 @@ rrweb 代码分为录制和回放两部分,大多数时候用户在被录制
- [@rrweb/rrweb-plugin-canvas-webrtc-record](packages/plugins/rrweb-plugin-canvas-webrtc-record):一个用于通过 WebRTC 流式传输 `<canvas>` 的插件。
- [@rrweb/rrweb-plugin-canvas-webrtc-replay](packages/plugins/rrweb-plugin-canvas-webrtc-replay):一个用于通过 WebRTC 播放流式 `<canvas>` 的插件。

### 通过 npm 引入
### 选项二:通过 npm 引入

```shell
npm install --save rrweb
Expand Down
Loading