-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/beauty' into release/showroom
- Loading branch information
Showing
28 changed files
with
3,663 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
实时音视频互动中,美颜功能可以让用户展现更好的精神面貌,并提供有趣的贴纸特效。声网与第三方厂商合作,开发了声网场景化 API,使开发者能够方便地集成美颜功能。声网场景化 API,也称为 Beauty API,封装了声网 RTC SDK 和第三方美颜 SDK 的 API 调用逻辑,开发者只需几行代码就能在声网的实时音视频互动中使用第三方提供的丰富美颜功能。 | ||
|
||
## 获取资源 | ||
|
||
声网目前已与商汤美颜、字节火山美颜、相芯美颜合作,提供美颜场景化 API,开发者可以根据自己的需求选择不同厂商进行集成。集成过程中,你可以参考如下资源: | ||
|
||
|美颜厂商 | 场景化美颜版本号 |GitHub 示例项目 | 参考文档 | | ||
|-----|-----------|---------------|------------| | ||
| 商汤 | 1.0.1.1| <li>[Android 项目](https://github.com/AgoraIO-Community/BeautyAPI/tree/1.0.1.1/Android)</li><li>[iOS 项目](https://github.com/AgoraIO-Community/BeautyAPI/tree/1.0.1.1/iOS)</li> | <li>[跑通项目 (Android)](./beauty_run_github_project_sensetime_android.md)</li><li>[跑通项目 (iOS)](./beauty_run_github_project_sensetime_ios.md)</li><li>[实现美颜 (Android)](./beauty_integration_sensetime_android.md)</li><li>[实现美颜 (iOS)](./beauty_integration_sensetime_android.md)</li> | | ||
| 字节火山 |1.0.2 或之后| <li>[Android 项目](https://github.com/AgoraIO-Community/BeautyAPI/tree/main/Android)</li><li>[iOS 项目](https://github.com/AgoraIO-Community/BeautyAPI/tree/main/iOS)</li> | <li>[跑通项目 (Android)](./beauty_run_github_project_bytedance_android.md)</li><li>[跑通项目 (iOS)](./beauty_run_github_project_bytedance_ios.md)</li><li>[实现美颜 (Android)](./beauty_integration_bytedance_android.md)</li><li>[实现美颜 (iOS)](./beauty_integration_bytedance_android.md)</li> | | ||
| 相芯 |1.0.2 或之后| <li>[Android 项目](https://github.com/AgoraIO-Community/BeautyAPI/tree/main/Android)</li><li>[iOS 项目](https://github.com/AgoraIO-Community/BeautyAPI/tree/main/iOS)</li> | <li>[跑通项目 (Android)](./beauty_run_github_project_faceunity_android.md)</li><li>[跑通项目 (iOS)](./beauty_run_github_project_faceunity_ios.md)</li><li>[实现美颜 (Android)](./beauty_integration_faceunity_android.md)</li><li>[实现美颜 (iOS)](./beauty_integration_faceunity_android.md)</li> | | ||
|
||
|
||
## 版本说明 | ||
|
||
本节说明秀场直播示例项目、场景化美颜示例项目、美颜 SDK 的版本信息。 | ||
|
||
### 秀场直播 | ||
|
||
|秀场直播版本号| GitHub 示例项目 | | ||
|-----|--------| | ||
| 3.0.0.1 | <li>[Android 项目](https://github.com/AgoraIO-Usecase/agora-ent-scenarios/tree/v3.0.0.1-all-Android/Android/scenes/show)</li><li>[iOS 项目](https://github.com/AgoraIO-Usecase/agora-ent-scenarios/tree/v3.0.0-all-iOS/iOS/AgoraEntScenarios/Scenes/Show)</li> | | ||
| 3.0.1 | <li>[Android 项目](https://github.com/AgoraIO-Usecase/agora-ent-scenarios/tree/feat/scene/all_android_3.0.1/Android/scenes/show)</li><li>[iOS 项目](https://github.com/AgoraIO-Usecase/agora-ent-scenarios/tree/feat/scene/all_ios_3.0.1/iOS/AgoraEntScenarios/Scenes/Show)</li> | | ||
|
||
<div class="alert note">声网已在 3.0.1 版(最新版)的秀场直播示例项目中集成 1.0.1.1 版场景化美颜(商汤)供你参考。</div> | ||
|
||
### 场景化美颜 | ||
|
||
各版本的场景化美颜示例项目代码可以在 `BeautyAPI` 仓库的 [Tags](https://github.com/AgoraIO-Community/BeautyAPI/tags) 中查看。 | ||
|
||
![](https://web-cdn.agora.io/docs-files/1694426614022) | ||
|
||
### 美颜 SDK | ||
|
||
Beauty API 中封装的声网 RTC SDK 和第三方厂商美颜 SDK 版本请参考 [README](https://github.com/AgoraIO-Community/BeautyAPI/blob/main/README.zh.md)。 | ||
|
||
![](https://web-cdn.agora.io/docs-files/1694425497610) |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@startuml | ||
autonumber | ||
title 美颜场景化 API (Beauty API) 时序图 | ||
participant "App" as app | ||
participant "声网 RTC SDK" as rtc | ||
participant "Beauty API" as api | ||
participant "商汤美颜 SDK" as beauty | ||
app -> app: 进入预览和直播间 | ||
== 初始化 RtcEngine == | ||
app -> rtc: RtcEngine.create \n创建并初始化 RtcEngine 对象 | ||
== 初始化美颜 SDK == | ||
app -> beauty: 创建并初始化 STRenderKit | ||
== 初始化 Beauty API == | ||
app -> api: createSenseTimeBeautyAPI \n创建 Beauty API 对象 | ||
alt #WhiteSmoke 使用声网模块采集视频 | ||
app -> api: initialize(captureMode.**Agora**) \n初始化 Beauty API 对象 | ||
end | ||
alt #AntiqueWhite 自定义视频采集 | ||
app -> api: initialize(captureMode.**Custom**) \n初始化 Beauty API 对象 | ||
end | ||
== 开启美颜 == | ||
app -> api: enable | ||
== 开启视频采集 == | ||
app -> rtc: enableVideo \n开启视频模块 | ||
alt #WhiteSmoke 使用声网模块采集视频 | ||
app -> rtc: setupLocalVideo \n设置本地视图 | ||
end | ||
alt #AntiqueWhite 开发者自定义视频采集 | ||
app -> rtc: registerVideoFrameObserver \n注册原始视频数据观测器 | ||
api -->> rtc: onFrame \n传递原始视频数据 | ||
rtc -->> app: onCaptureVideoFrame \n传递原始视频数据 | ||
end | ||
== 加入频道 == | ||
app -> rtc: joinChannel | ||
== 设置美颜效果 == | ||
app -> api: setBeautyPreset \n设置是否使用默认且推荐的美颜参数 | ||
app -> beauty: 如需更多美颜效果,例如贴纸、美妆风格,可直接调用美颜 SDK 的 API | ||
== 离开频道 == | ||
app -> rtc: leaveChannel | ||
== 销毁资源 == | ||
app -> api: release \n销毁 Beauty API 对象 | ||
app -> beauty: release \n销毁 STRenderKit | ||
app -> rtc: destroy \n销毁 RtcEngine 对象 | ||
app -> app: 退出预览和直播间 | ||
@enduml |
Oops, something went wrong.