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

秀场直播二期新增文档 #3328

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
2abc92f
[beauty] wip
kelzr Jul 21, 2023
0fe9f06
[beauty] add input
kelzr Jul 21, 2023
781c01f
[beauty] wip
kelzr Jul 24, 2023
219e8dd
[beauty] wip
kelzr Jul 24, 2023
e964988
[beauty] wip
kelzr Jul 25, 2023
36fc882
[beauty] wip
kelzr Jul 25, 2023
14d0ead
[beauty] fix code
kelzr Jul 26, 2023
3432dc7
[beauty] wip
kelzr Jul 27, 2023
dc77597
[chatroom] wip
kelzr Jul 27, 2023
d102350
[beauty] wip
kelzr Jul 27, 2023
93d5384
[beauty] wip
kelzr Jul 31, 2023
2eb9125
[beauty] wip
kelzr Aug 3, 2023
6a3b966
[beauty] run android
kelzr Aug 3, 2023
e7ac49f
[beauty] integration android wip
kelzr Aug 3, 2023
21e20b2
[beauty] integration android wip
kelzr Aug 4, 2023
1908c1b
[beauty] integration android wip
kelzr Aug 4, 2023
1f45018
[beauty] wip
kelzr Aug 4, 2023
5fbb004
[beauty] wip
kelzr Aug 8, 2023
93065b7
[beauty] wip
kelzr Aug 9, 2023
3761451
[beauty] discuss
kelzr Aug 14, 2023
dee2cce
[beauty] update
kelzr Aug 15, 2023
7760474
[beauty] wip
kelzr Aug 17, 2023
4d3af1e
[beauty] wip
kelzr Aug 17, 2023
8e3c820
[beauty] wip
kelzr Aug 17, 2023
469313a
[beauty] wip
kelzr Aug 17, 2023
a395c67
[beauty] wip
kelzr Aug 18, 2023
585452b
[beauty] wip
kelzr Aug 18, 2023
4479158
[beauty] template
kelzr Aug 21, 2023
4d6fcb5
[beauty] wip
kelzr Aug 21, 2023
c5be22e
[beauty] wip
kelzr Aug 21, 2023
d41e1c2
[beauty] wip
kelzr Aug 21, 2023
bfd3873
[beauty] wip
kelzr Aug 22, 2023
4fb875a
[beauty] wip
kelzr Aug 22, 2023
d4b8903
[beauty] wip
kelzr Aug 22, 2023
308df37
[beauty] wip
kelzr Aug 23, 2023
4f1852d
[showroom] wip
kelzr Aug 23, 2023
6cb0845
[beauty] wip
kelzr Aug 23, 2023
b982456
[beauty] wip
kelzr Aug 24, 2023
f53f085
[beauty] wip
kelzr Aug 25, 2023
97edd52
[showroom] wip
kelzr Aug 29, 2023
25028af
[showroom] wip
kelzr Aug 29, 2023
e48c48f
[beauty] wip
kelzr Aug 30, 2023
c0235f8
[beauty] wip
kelzr Aug 31, 2023
9f76afa
[beauty] wip
kelzr Sep 1, 2023
cf2b570
[beauty] wip
kelzr Sep 4, 2023
8ad411d
[showroom] wip
kelzr Sep 5, 2023
4a6231e
[beauty] wip
kelzr Sep 6, 2023
7afe5f9
[beauty] wip
kelzr Sep 6, 2023
376925f
[beauty] wip
kelzr Sep 6, 2023
814392e
Merge branch 'master' into release/showroom
kelzr Sep 8, 2023
0789e06
Merge branch 'master' into release/beauty
kelzr Sep 8, 2023
361e22e
[beauty] wip
kelzr Sep 8, 2023
1ef5567
[beauty] wip
kelzr Sep 11, 2023
70120b0
[beauty] wip
kelzr Sep 11, 2023
8507a98
Merge branch 'release/beauty' into release/showroom
kelzr Sep 11, 2023
a637bbd
Merge branch 'master' into release/showroom
kelzr Sep 12, 2023
ff80b13
[beauty] wip
kelzr Sep 12, 2023
a0469c7
[beauty] update after review
kelzr Sep 19, 2023
9a57bd6
[beauty] update after review
kelzr Sep 25, 2023
d154fa5
[beauty] update after review
kelzr Sep 26, 2023
352867e
rename file
kelzr Nov 23, 2023
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
37 changes: 37 additions & 0 deletions markdown/beauty/其他/beauty_overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
实时音视频互动中,美颜功能可以让用户展现更好的精神面貌,并提供有趣的贴纸特效。声网与第三方厂商合作,开发了声网美颜场景化 API,使开发者能够方便地集成美颜功能。声网美颜场景化 API,也称为 Beauty API,封装了声网 RTC SDK 和第三方美颜 SDK 的 API 调用逻辑,开发者只需几行代码就能在声网的实时音视频互动中使用第三方提供的丰富美颜功能。

## 获取资源

声网目前已与商汤美颜、字节火山美颜、相芯美颜合作,提供美颜场景化 API,开发者可以根据自己的需求选择不同厂商进行集成。集成过程中,你可以参考如下资源:
kelzr marked this conversation as resolved.
Show resolved Hide resolved

|美颜厂商 | 美颜场景化 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)</li><li>[跑通项目 (iOS)](./beauty_run_github_project_sensetime_ios)</li><li>[实现美颜 (Android)](./beauty_integration_sensetime_android)</li><li>[实现美颜 (iOS)](./beauty_integration_sensetime_android)</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)</li><li>[跑通项目 (iOS)](./beauty_run_github_project_bytedance_ios)</li><li>[实现美颜 (Android)](./beauty_integration_bytedance_android)</li><li>[实现美颜 (iOS)](./beauty_integration_bytedance_android)</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)</li><li>[跑通项目 (iOS)](./beauty_run_github_project_faceunity_ios)</li><li>[实现美颜 (Android)](./beauty_integration_faceunity_android)</li><li>[实现美颜 (iOS)](./beauty_integration_faceunity_android)</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> |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS 链接里的版本号是 v3.0.0,不是 3.0.0.1,是 iOS 没有 3.0.0.1 版本吗?

Copy link
Collaborator Author

@kelzr kelzr Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你发现的盲点。看起来是这样。agora-ent-scenarios 仓库的 tag 和版本都不太规范。

| 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)。

![](https://web-cdn.agora.io/docs-files/1694425497610)
Empty file.
Empty file.
45 changes: 45 additions & 0 deletions markdown/beauty/商汤/1.0.1.1/Android.wsd
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
Loading
Loading