-
Notifications
You must be signed in to change notification settings - Fork 19
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
auikaraoke #3336
auikaraoke #3336
Conversation
|
||
**参数** | ||
|
||
- `startTime`:房间创建的时间。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为是获取房间列表的接口,或许改为:
获取房间列表的起始时间。传递一个时间戳作为起始时间,用于筛选在该时间之后创建的房间。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
startTime 是一个需要填的参数,改为“获取房间列表的起始时间”感觉有点不太对?
改为:房间创建的时间,用于筛选在该时间之后创建的房间?
**参数** | ||
|
||
- `roomName`:房间名。 | ||
- `thumbnail`:房间列表上指用户头像的 URL。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上指用户 —> 上指定用户?
不懂就问 - 这个是创建房间的时候配置的信息,是不是创建房间的用户默认就是房主?那这里是创建者头像的 URL 么?还是说创建的时候就能指定是哪个用户。。
- `thumbnail`:房间列表上指用户头像的 URL。 | ||
- `micSeatCount`:房间中的麦位数量,取值范围 [1-8]。 | ||
- `password`:房间密码。 | ||
- `micSeatStyle`:房间中麦位的排列样式。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个看数据类型是 String,想问具体支持哪些排列样式、可以传入哪些字符串?
|
||
### <h3 className="anchor" id="AUIRoomConfig">AUIRoomConfig</h3> | ||
|
||
K 歌房间设置。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看你其他的 api 都是把一句话描述写在原型下面,这个要不要保持一致也挪下去
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要
karaokeView: AUIKaraokeRoomView) | ||
``` | ||
|
||
拉起 K 歌房间。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(无关review)拉起=launch,有被笑到哈哈哈哈哈哈哈哈哈哈哈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无关联想(推倒)房间
**参数** | ||
|
||
- `roomInfo`:需要拉起的房间信息,详见 [AUIRoomInfo](#AUIRoomInfo)。 | ||
- `appId`:(可选)你的项目在控制台注册的 App ID。如果在调用 `setup` 进行初始化时设置了 `appId`,则此处为必填,否则可传入 `nil`。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那 AUICommonConfig 的 appId 字段,是否也可以穿入 nil;如果是的话,是否要在描述里补充一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config里面的app id 不是可选字段,是要传的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
诶,那是不是要删一下「如果在调用 setup
进行初始化时设置了 appId
」的如果,以及这里 appId 属性也不是可选是必填了,而且应该要与 setup 的 config 里传的一致?
### subscribeError | ||
|
||
```swift | ||
fun subscribeError(roomId: String, delegate: AUIRtmErrorProxyDelegate) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里应该是 func?(是真的想 have fun 了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
后面几个也要一起改下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈原来Android 是fun ios 是func (好想回到过去have fun
**参数** | ||
|
||
- `roomId`:房间 ID。 | ||
- `delegate`:[AUIRtmErrorProxyDelegate]() 对象,用于处理错误事件。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
链接记得加一下
mRoomManager?.bindRespDelegate(delegate) | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果需要对外的话,这里记得加下描述
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今天加好啦
|
||
|
||
|
||
## 数据模型 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个说法一下就高级了起来,之前讨论过的好像是用「数据类型」比较多,可以考虑下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我问了下gpt,感觉根据她的解释,模型可能更合适。
“在编写API文档时,使用术语“数据模型”更加贴切。数据模型通常用于描述数据的结构、属性和关系,而不仅仅是数据的类型。数据模型可以包括更丰富的信息,例如类的属性、方法以及它们之间的关系,这些信息对于理解API的使用和行为非常重要。
当你描述一个类或对象时,可以说它是一个数据模型,这样更准确地传达了它不仅包含数据类型信息,还包括了数据的组织方式和相关的行为。这可以帮助API的使用者更好地理解如何与API交互,包括如何访问属性、调用方法等。”
|
||
## 数据模型 | ||
|
||
### <h3 className="anchor" id="AUICommonConfig"> AUICommonConfig</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
搬到新站后要再用脚本跑一下,前面的 h2 h3 没有被替换
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okk
markdown/online-ktv/AUIKaraoke/AUIKitKaraoke Objective-C API.md
Outdated
Show resolved
Hide resolved
- `roomId`:房间 ID。 | ||
- `roomOwner`:房主信息,详见 [AUIUserThumbnailInfo](#AUIUserThumbnailInfo)。 | ||
- `onlineUsers`:房间内的人数。 | ||
- `createTime`:房间创建的时间,单位为毫秒。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那应该是时间戳?是的话可以明确说明一下
|
||
<Admonition type="caution" title="注意"> | ||
|
||
请确保你使用的 RTM Token 是 AccessToken2。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有要求是 rtm1.x 或者 2.x 吗?可以链接到对应的 token 鉴权文档
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上次问了 2.x 还没有token文档
|
||
请确保你使用的 RTM Token 是 AccessToken2。 | ||
|
||
- `rtcToken007`:(rtm login 用)加入主频道的 RTC Token。在合唱场景下,领唱需要加入两个频道,在主频道发布人声和播放器的混流,在合唱频道发布麦克风采集的音频流。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(rtm login 用)——应该要换下描述形式,这个写法不太正式,可以说「用于登录 RTM 系统的 RTC Token」之类的?虽然不确定为什么登录 RTM 系统需要 RTC Token……
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里应该也要链接到 AccessToken2 的文档比较好
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是研发的注释,忘记删掉了😅
rtm 2.x 需要两个token,一个rtc的一个rtm的..
|
||
下图展示搭建 K 歌房间的完整流程: | ||
|
||
<img src="/Users/admin/Library/Application Support/typora-user-images/image-20230830103826589.png" alt="image-20230830103826589" style="zoom:50%;" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看不到诶
|
||
1. [创建一个新的项目](https://help.apple.com/xcode/mac/current/#/dev07db0e578),**Application** 选择 **App**,**Interface** 选择 **Storyboard**,**Language** 选择 **Swift**。 | ||
|
||
如果你没有添加过开发团队信息,会看到 **Add account…** 按钮。点击该按钮并按照屏幕提示登入 Apple ID,点击 **Next**,完成后即可选择你的 Apple 账户作为开发团队。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「登入 Apple ID」的说法还挺特别的,苹果简中文档好像一般都用「输入 Apple ID」,不过不影响理解
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那我改成登陆吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
登录
KaraokeUIKit.shared.setup(roomConfig: commonConfig, | ||
// KtvApi 对象。如果你的项目中还未集成 KtvApi,请传入 nil, AUIKaraoke 内部会自行创建 | ||
ktvApi: nil, | ||
// RtcEngine 对象。如果的你的项目中还未集成声网实时互动 SDK,请传入 AUIKaraoke 内部会自行创建 | ||
rtcEngine: nil, | ||
// RtmClient 对象。如果的你的项目中还未集成声网 RTM SDK,请传入 nil,AUIKaraoke 内部会自行创建 | ||
rtmClient: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KaraokeUIKit.shared.setup(roomConfig: commonConfig, | |
// KtvApi 对象。如果你的项目中还未集成 KtvApi,请传入 nil, AUIKaraoke 内部会自行创建 | |
ktvApi: nil, | |
// RtcEngine 对象。如果的你的项目中还未集成声网实时互动 SDK,请传入 AUIKaraoke 内部会自行创建 | |
rtcEngine: nil, | |
// RtmClient 对象。如果的你的项目中还未集成声网 RTM SDK,请传入 nil,AUIKaraoke 内部会自行创建 | |
rtmClient: nil) | |
KaraokeUIKit.shared.setup(roomConfig: commonConfig, | |
// KtvApi 对象。如果你的项目中还未集成 KtvApi,请传入 nil, AUIKaraoke 内部会自行创建 | |
ktvApi: nil, | |
// RtcEngine 对象。如果你的项目中还未集成声网实时互动 SDK,请传入 nil,AUIKaraoke 内部会自行创建 | |
rtcEngine: nil, | |
// RtmClient 对象。如果你的项目中还未集成声网 RTM SDK,请传入 nil,AUIKaraoke 内部会自行创建 | |
rtmClient: nil) |
KaraokeUIKit.shared.setup(roomConfig: commonConfig, | |
// KtvApi 对象。如果你的项目中还未集成 KtvApi,请传入 nil, AUIKaraoke 内部会自行创建 | |
ktvApi: nil, | |
// RtcEngine 对象。如果的你的项目中还未集成声网实时互动 SDK,请传入 AUIKaraoke 内部会自行创建 | |
rtcEngine: nil, | |
// RtmClient 对象。如果的你的项目中还未集成声网 RTM SDK,请传入 nil,AUIKaraoke 内部会自行创建 | |
rtmClient: nil) | |
KaraokeUIKit.shared.setup(roomConfig: commonConfig, | |
// KtvApi 对象。如果你的项目中还未集成 KtvApi,请传入 nil, AUIKaraoke 内部会自行创建 | |
ktvApi: nil, | |
// RtcEngine 对象。如果的你的项目中还未集成声网实时互动 SDK,请传入 AUIKaraoke 内部会自行创建 | |
rtcEngine: nil, | |
// RtmClient 对象。如果的你的项目中还未集成声网 RTM SDK,请传入 nil,AUIKaraoke 内部会自行创建 | |
rtmClient: nil) |
markdown/online-ktv/AUIKaraoke/AUIKitKaraoke Objective-C API.md
Outdated
Show resolved
Hide resolved
|
||
### 4. 拉起房间 | ||
|
||
调用 `launchRooom` 拉起房间。至此,你已经成功搭建一个带有 UI 界面的在线 K 歌房间,你可以 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
尾巴不见了,留下了悬念
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
猜猜能干点啥
} | ||
``` | ||
|
||
## 示例项目 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还可以放一下 API 参考文档
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以及还少了时序图的一席之地
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
关于时序图只有一个疑问:为什么参与者只有 AScenesKit 但没有 swift API 文档里提到的 KaraokeUIKit 类
其它没啥问题,与最终的集成文档顺序保持一致即可(目前看到 xxxRoomService 还没有
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
时序图需要把sceneskit拿掉,然后换成AUIKaraoke
|
||
- `rtcChannelName`:主频道的频道名。 | ||
|
||
- `rtcRtcToken`:加入主频道的 RTC Token。在合唱场景下,领唱需要加入两个频道,在主频道发布人声和播放器的混流,在合唱频道发布麦克风采集的音频流。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「在合唱场景下,领唱需要加入两个频道,在主频道发布人声和播放器的混流,在合唱频道发布麦克风采集的音频流。」这一句在这个 config 的描述中出镜率很高。我个人觉得多次出现会有点冗余,并且担心哪一句没认真看完就会错过什么信息,所以偏向于在第一次出现的时候完整解释,后面就直接用合唱频道、主频道的概念了。你可以再考虑下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得可以
|
||
通用设置。 | ||
|
||
**参数** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从这里开始的「参数」是不是换成「属性」更合适
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的
No description provided.