... | ... | @@ -2,6 +2,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 云直播回放观看端SDK开发指南
|
|
|
|
|
|
# 1.概述
|
... | ... | @@ -47,25 +49,26 @@ |
|
|
**必须 ** 需在 Podfile 文件中添加以下代码(最新)
|
|
|
|
|
|
```shell
|
|
|
pod 'CCLivePlaySDK'
|
|
|
pod 'HDVideoClass_BSDK', '6.20.0'
|
|
|
pod 'CCLivePlaySDK', '4.9.0'
|
|
|
pod 'HDVideoClass_BSDK', '6.25.0'
|
|
|
pod 'HDSSZip'
|
|
|
pod 'HDSCocoaLumberjack'
|
|
|
pod 'AgoraRtcEngine_iOS', '3.4.8'
|
|
|
pod 'HDSAliyunPlayer'
|
|
|
pod 'HDSCocoaLumberjack', '4.9.0'
|
|
|
pod 'AgoraRtcEngine_iOS', '3.7.2'
|
|
|
pod 'HDSAliyunPlayer', '4.9.0'
|
|
|
pod 'HDStreamLib'
|
|
|
```
|
|
|
|
|
|
**可选**(互动组件)
|
|
|
|
|
|
```shell
|
|
|
pod 'HDSInteractionEngine'
|
|
|
pod 'HDSLikeModule'
|
|
|
pod 'HDSGiftModule'
|
|
|
pod 'HDSVoteModule'
|
|
|
pod 'HDSRedEnvelopeModule'
|
|
|
pod 'HDSInvitationCardModule'
|
|
|
pod 'HDSQuestionnaireModule'
|
|
|
pod 'HDSLiveStoreModule'
|
|
|
pod 'HDSInteractionEngine', '4.9.0'
|
|
|
pod 'HDSLikeModule', '4.9.0'
|
|
|
pod 'HDSGiftModule', '4.9.0'
|
|
|
pod 'HDSVoteModule', '4.9.0'
|
|
|
pod 'HDSRedEnvelopeModule', '4.9.0'
|
|
|
pod 'HDSInvitationCardModule', '4.9.0'
|
|
|
pod 'HDSQuestionnaireModule', '4.9.0'
|
|
|
pod 'HDSLiveStoreModule', '4.9.0'
|
|
|
```
|
|
|
|
|
|
|
... | ... | @@ -1122,7 +1125,7 @@ typedef NS_ENUM(NSUInteger, PlaybackCoreType) { |
|
|
|
|
|
## 3.6 问答功能
|
|
|
|
|
|
问答功能的方法回调,相关类RequestDataPlayBack,相关方法如下:
|
|
|
##### 问答功能的方法回调,相关类RequestDataPlayBack,相关方法如下:(改动)
|
|
|
|
|
|
| 方法 | 说明 | 备注 |
|
|
|
| :------------------------------------ | :----------------------- | ---------------------------------- |
|
... | ... | @@ -1139,34 +1142,140 @@ typedef NS_ENUM(NSUInteger, PlaybackCoreType) { |
|
|
|
|
|
其中 questionArr 数据中包含的字段信息如下:
|
|
|
|
|
|
| 字段 | 类型 | 注释 |
|
|
|
| ------------------ | ------ | ----------------------------------------------------- |
|
|
|
| id | String | 问答ID |
|
|
|
| content | String | 问答内容 |
|
|
|
| groupId | String | 组ID |
|
|
|
| time | int | 问答发布时间 秒 (相对时间) |
|
|
|
| questionUserId | String | 发送人ID |
|
|
|
| questionUserName | String | 发送人昵称 |
|
|
|
| questionUserAvatar | String | 发送人头像 |
|
|
|
| encryptId | String | 加密ID |
|
|
|
| isPublish | int | 是否发布此条问答 |
|
|
|
| ttriggerTime | String | 问答发布时间 秒 (绝对时间)例:"2012-09-03 00:09:43" |
|
|
|
| 字段 | 类型 | 注释 |
|
|
|
| ------------------ | ---------- | ----------------------------------------------------- |
|
|
|
| id | String | 问答ID |
|
|
|
| content | String | 问答内容 |
|
|
|
| groupId | String | 组ID |
|
|
|
| time | int | 问答发布时间 秒 (相对时间) |
|
|
|
| questionUserId | String | 发送人ID |
|
|
|
| questionUserName | String | 发送人昵称 |
|
|
|
| questionUserAvatar | String | 发送人头像 |
|
|
|
| encryptId | String | 加密ID |
|
|
|
| isPublish | int | 是否发布此条问答 |
|
|
|
| ttriggerTime | String | 问答发布时间 秒 (绝对时间)例:"2012-09-03 00:09:43" |
|
|
|
| extra | Dictionary | (新增字段) 文件 |
|
|
|
|
|
|
|
|
|
|
|
|
answerArr 数组中包含的字段信息如下:
|
|
|
|
|
|
| 字段 | 类型 | 注释 |
|
|
|
| ---------------- | ------ | ------------------------------------------------------- |
|
|
|
| content | Sting | 回复内容 |
|
|
|
| groupId | String | 组ID |
|
|
|
| id | String | 回复ID |
|
|
|
| isPrivate | int | 是否是私密回复 |
|
|
|
| time | int | 发布回复的时间 秒 (相对时间) |
|
|
|
| triggerTime | String | 发布回复的时间 秒 (角色时间)例:"2012-09-03 00:09:43" |
|
|
|
| answerUserAvatar | String | 发送人头像 |
|
|
|
| answerUserId | String | 发送人ID |
|
|
|
| answerUserName | String | 发送人昵称 |
|
|
|
| answerUserRole | String | 发送人角色 (具体参考 回放用到的 “角色” 字段含义) |
|
|
|
| encryptId | String | 加密ID |
|
|
|
| 字段 | 类型 | 注释 |
|
|
|
| ---------------- | ---------- | ------------------------------------------------------- |
|
|
|
| content | Sting | 回复内容 |
|
|
|
| groupId | String | 组ID |
|
|
|
| id | String | 回复ID |
|
|
|
| isPrivate | int | 是否是私密回复 |
|
|
|
| time | int | 发布回复的时间 秒 (相对时间) |
|
|
|
| triggerTime | String | 发布回复的时间 秒 (角色时间)例:"2012-09-03 00:09:43" |
|
|
|
| answerUserAvatar | String | 发送人头像 |
|
|
|
| answerUserId | String | 发送人ID |
|
|
|
| answerUserName | String | 发送人昵称 |
|
|
|
| answerUserRole | String | 发送人角色 (具体参考 回放用到的 “角色” 字段含义) |
|
|
|
| encryptId | String | 加密ID |
|
|
|
| extra | Dictionary | (新增字段) 文件 |
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
```objc
|
|
|
/**
|
|
|
* @brief 收到本房间的历史提问&回答
|
|
|
*/
|
|
|
- (void)onParserQuestionArr:(NSArray *)questionArr onParserAnswerArr:(NSArray *)answerArr {
|
|
|
questionArr = [{
|
|
|
"content" = "";
|
|
|
"encryptId" = "";
|
|
|
"groupId" = "";
|
|
|
"id" = "";
|
|
|
"isPublish" = (0);
|
|
|
"questionUserAvatar" = "";
|
|
|
"questionUserId" = "";
|
|
|
"questionUserName" = "";
|
|
|
"time" = (0);
|
|
|
"triggerTime" = "";
|
|
|
新增字段 --> "extra" = {"img":[{
|
|
|
"order":0,
|
|
|
"url":""
|
|
|
}]
|
|
|
};
|
|
|
}]
|
|
|
|
|
|
|
|
|
answerArr = [{
|
|
|
"content" = "";
|
|
|
"encryptId"= "";
|
|
|
"groupId" = "";
|
|
|
"id" = "";
|
|
|
"isPrivate" = (0);
|
|
|
"answerUserAvatar" = "";
|
|
|
"answerUserId" = "";
|
|
|
"answerUserName" = "";
|
|
|
"time" = (0);
|
|
|
"triggerTime" = "";
|
|
|
"answerUserRole" = "";
|
|
|
新增字段 --> "extra" = {"img":[{
|
|
|
"order":0,
|
|
|
"url":""
|
|
|
}]
|
|
|
};
|
|
|
}]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
##### 获取全量问答数据(主动)(改动)
|
|
|
|
|
|
| 方法 | 说明 |
|
|
|
| ----------------- | ---------------- |
|
|
|
| (void)fetchAllQA: | 获取全量问答数据 |
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
```objc
|
|
|
/**
|
|
|
* 3.16.0 new
|
|
|
* @brief 获取全量问答数据
|
|
|
* @param completion 数据回调
|
|
|
*/
|
|
|
- (void)fetchAllQA:(void (^)(NSArray * results))completion {
|
|
|
results = [{
|
|
|
"content" = "";
|
|
|
"encryptId" = "";
|
|
|
"groupId" = "";
|
|
|
"id" = "";
|
|
|
"isPublish" = (0);
|
|
|
"userAvatar" = "";
|
|
|
"userId" = "";
|
|
|
"userName" = "";
|
|
|
"time" = (0);
|
|
|
"triggerTime" = "";
|
|
|
新增字段 --> "extra" = {"img":[{
|
|
|
"order":0,
|
|
|
"url":""
|
|
|
}]
|
|
|
};
|
|
|
"answers" = [{
|
|
|
"content" = "";
|
|
|
"encryptId"= "";
|
|
|
"groupId" = "";
|
|
|
"id" = "";
|
|
|
"isPrivate" = (0);
|
|
|
"userAvatar" = "";
|
|
|
"userId" = "";
|
|
|
"userName" = "";
|
|
|
"time" = (0);
|
|
|
"triggerTime" = "";
|
|
|
"userRole" = "";
|
|
|
新增字段 --> "extra" = {"img":[{
|
|
|
"order":0,
|
|
|
"url":""
|
|
|
}]
|
|
|
};
|
|
|
}]
|
|
|
}]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
|
|
|
|
... | ... | |