Skip to content

Commit

Permalink
CHG:轻应用H5支持云录制2.0播放
Browse files Browse the repository at this point in the history
  • Loading branch information
RaconXXY committed Dec 12, 2024
1 parent c20c71d commit b838982
Show file tree
Hide file tree
Showing 44 changed files with 13,630 additions and 26,022 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## v8.1.2(2024-12-12)

#### Feat

- 新增静态多语言变量 `LOCALES`, 可以使用 `EZUIKitPlayer.LOCALES` 访问
- 更新 header 的 默认样式和交互, 和 footer 保持一致
- 弃用 hls,请使用 [ezuikti-flv](https://www.npmjs.com/package/ezuikit-flv) 代替
- 弃用 flv,请使用 [@ezuikit/player-hls] https://www.npmjs.com/package/@ezuikit/player-hls 代替
- 弃用 EZWebRtc, 请使用 [ertc-web](https://www.npmjs.com/package/ertc-web)
- H5模板支持云录制2.0

#### Fixed

- 修复移动端回放主题退出全屏后,日历的位置不对的问题
- 修复多实例播放时,小概率出现绿屏、花屏的问题
- 修复实例销毁后,dom节点和样式文件残留的问题

## v8.1.1 (2024-11-18)

#### Feat
Expand Down Expand Up @@ -33,6 +50,7 @@
## v8.0.12(2024-10-14)

- 新增备用机房地址获取逻辑

- 取流失败、断流时使用备用机房发起取流请求,提高可用性保障

- 清晰度切换逻辑优化
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ pnpm add ezuikit-js
### 引入 ezuikit-js

```js
import EZUIKit from 'ezuikit-js';
import EZUIKit from "ezuikit-js";
```

#### 如果你使用原生方法,可以通过标签引用

```html
<!-- umd -->
<script src="./ezuikit.js"></script>
<!-- umd -->
<script src="./ezuikit.js"></script>
```

### 开始使用 - 初始化
Expand All @@ -50,7 +50,7 @@ import EZUIKit from 'ezuikit-js';
创建 DOM

```html
<div id="video-container"></div>
<div id="video-container"></div>
```

## 播放器初始化
Expand Down Expand Up @@ -482,38 +482,38 @@ player.setVolumeGain(volume);
#### 获取麦克风权限

```js
player.getMicrophonePermission().then(data => {
player.getMicrophonePermission().then((data) => {
if (data.code === 0) {
// 成功....
}
})
});
```

#### 获取麦克风列表

```js
// 需要在麦克风已授权的情况下调用,才能获取到麦克风列表,可以和getMicrophonePermission配合使用,或在初始化后先调用getMicrophonePermission获取授权
player.getMicrophonesList().then(data => {
player.getMicrophonesList().then((data) => {
if (data.code === 0) {
// 成功....
}
})
});
```

#### 切换麦克风

```js
// microphoneId 为获取到的麦克风列表中的deviceId,如果当前处于对讲中,调用setProfile会先关闭,重新发起对讲
player.setProfile({ microphoneId })
player.setProfile({ microphoneId });
```

#### 监听麦克风音量变化

```js
player.eventEmitter.on('volumeChange', ({ data }) => {
player.eventEmitter.on("volumeChange", ({ data }) => {
// 动态显示音柱,100ms触发一次
console.log(`${data * 100}%`)
})
console.log(`${data * 100}%`);
});
```

#### 全屏
Expand Down Expand Up @@ -564,10 +564,10 @@ options 参数说明
> 可用于在播放中切换模板主题,请切换播放地址成功后调用
```js
player.Theme.changeTheme(template)
player.Theme.changeTheme(template);

// 预览切回放场景示例
player.changePlayUrl({type:"rec"}).then(()=>{
player.changePlayUrl({ type: "rec" }).then(() => {
console.log("地址切换成功,开始切换模板主题");
player.Theme.changeTheme("pcRec");
});
Expand Down
16 changes: 8 additions & 8 deletions demos/base-demo/ezuikit.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Binary file not shown.
Loading

0 comments on commit b838982

Please sign in to comment.