... | @@ -561,9 +561,9 @@ typedef NS_ENUM(NSUInteger, HDMoviePlaybackState) { |
... | @@ -561,9 +561,9 @@ typedef NS_ENUM(NSUInteger, HDMoviePlaybackState) { |
|
/**
|
|
/**
|
|
* 视频加载状态
|
|
* 视频加载状态
|
|
* HDMovieLoadStateUnknown 未知状态
|
|
* HDMovieLoadStateUnknown 未知状态
|
|
* HDMovieLoadStatePlayable 视频未完成全部缓冲,但已缓冲的数据可以进行播放
|
|
* HDMovieLoadStatePlayable 视频未完成全部缓存,但已缓存的数据可以进行播放
|
|
* HDMovieLoadStatePlaythroughOK 缓冲已经完成
|
|
* HDMovieLoadStatePlaythroughOK 完成缓存
|
|
* HDMovieLoadStateStalled 缓冲已经开始
|
|
* HDMovieLoadStateStalled 数据缓存已经停止,播放将暂停
|
|
*/
|
|
*/
|
|
typedef NS_ENUM(NSUInteger, HDMovieLoadState) {
|
|
typedef NS_ENUM(NSUInteger, HDMovieLoadState) {
|
|
HDMovieLoadStateUnknown,
|
|
HDMovieLoadStateUnknown,
|
... | @@ -1821,5 +1821,835 @@ typedef NS_ENUM(NSInteger, HDSRoomCallType) { |
... | @@ -1821,5 +1821,835 @@ typedef NS_ENUM(NSInteger, HDSRoomCallType) { |
|
| OnErrorType_GetPlaySourceFailed | 获取播放源失败(需要退出重进) |
|
|
| OnErrorType_GetPlaySourceFailed | 获取播放源失败(需要退出重进) |
|
|
| OnErrorType_GetSummaryFailed | 获取摘要失败(需要退出重进) |
|
|
| OnErrorType_GetSummaryFailed | 获取摘要失败(需要退出重进) |
|
|
|
|
|
|
| |
|
|
| 连麦事件 | 说明 |
|
|
| ---- | |
|
| ---------------------------------- | -------------------------------- |
|
|
\ No newline at end of file |
|
| HDSMediaCallErrorRoomTypeDidChange | 连麦房间类型改变(需要退出重进) |
|
|
|
|
| HDSMediaCallErrorAbilityDown | 连麦功能不可用(需要退出重进) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.8 切换线路和清晰度
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 房间的音视频线路 (已废弃)
|
|
|
|
* @param model LineModel 详情
|
|
|
|
*
|
|
|
|
* 废弃版本 3.14.0
|
|
|
|
* 兼容版本 2021年11月08日之后将不再维护
|
|
|
|
* 新方法 清晰度回调 - (void)HDReceivedVideoQuality:(NSDictionary *)dict;
|
|
|
|
* 线路回调 - (void)HDReceivedVideoAudioLines:(NSDictionary *)dict;
|
|
|
|
*/
|
|
|
|
- (void)HDReceivedVideoAudioLinesWithModel:(LineModel *)model;
|
|
|
|
/**
|
|
|
|
* The New Method (3.14.0)
|
|
|
|
* @brief 是否开启音频模式
|
|
|
|
* @param hasAudio HAVE_AUDIO_LINE_TURE 有音频 HAVE_AUDIO_LINE_FALSE 无音频
|
|
|
|
*
|
|
|
|
* 触发回调条件 1.初始化SDK登录成功后
|
|
|
|
*/
|
|
|
|
- (void)HDAudioMode:(HAVE_AUDIO_LINE)hasAudio;
|
|
|
|
/**
|
|
|
|
* The New Method (3.14.0)
|
|
|
|
* @brief 房间所包含的清晰度 (会多次回调)
|
|
|
|
* @param dict 清晰度数据
|
|
|
|
* 清晰度数据 key(包含的键值) type(数据类型) description(描述)
|
|
|
|
* qualityList(清晰度列表) array @[HDQualityModel(清晰度详情),HDQualityModel(清晰度详情)]
|
|
|
|
* currentQuality(当前清晰度) object HDQualityModel(清晰度详情)
|
|
|
|
*
|
|
|
|
* 触发回调条件 1.初始化SDK登录成功后
|
|
|
|
* 2.主动调用切换清晰度方法
|
|
|
|
* 3.主动调用切换视频模式回调
|
|
|
|
*/
|
|
|
|
- (void)HDReceivedVideoQuality:(NSDictionary *)dict;
|
|
|
|
/**
|
|
|
|
* The New Method (3.14.0)
|
|
|
|
* @brief 房间包含的音视频线路 (会多次回调)
|
|
|
|
* @param dict 线路数据
|
|
|
|
* 线路数据 key(包含的键值) type(数据类型) description(描述)
|
|
|
|
* lineList(线路列表) array @[@"line1",@"line2"]
|
|
|
|
* indexNum(当前线路下标) integer 0
|
|
|
|
*
|
|
|
|
* 触发回调条件 1.初始化SDK登录成功后
|
|
|
|
* 2.主动调用切换清晰度方法
|
|
|
|
* 3.主动调用切换线路方法
|
|
|
|
* 4.主动调用切换音视频模式回调
|
|
|
|
*/
|
|
|
|
- (void)HDReceivedVideoAudioLines:(NSDictionary *)dict;
|
|
|
|
```
|
|
|
|
|
|
|
|
主动方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* The New Method (3.14.0)
|
|
|
|
* @brief 切换播放类型
|
|
|
|
* @param mode PLAY_MODE_TYEP_VIDEO 视频模式(默认)
|
|
|
|
* PLAY_MODE_TYEP_AUDIO 音频模式(当前回放包含音频线路)
|
|
|
|
* @param completion 切换结果
|
|
|
|
* { success 0 切换成功 -1切换失败 -2 切换频繁
|
|
|
|
* reason 错误原因 }
|
|
|
|
*
|
|
|
|
* 切换播放器类型 切换为音频,回调 - (void)HDReceivedVideoAudioLines:(NSDictionary *)dict;
|
|
|
|
* 切换为视频,回调 - (void)HDReceivedVideoQuality:(NSDictionary *)dict;
|
|
|
|
* - (void)HDReceivedVideoAudioLines:(NSDictionary *)dict;
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
- (void)changePlayMode:(PLAY_MODE_TYEP)mode completion:(void (^)(NSDictionary * results))completion;
|
|
|
|
/**
|
|
|
|
* The New Method (3.14.0)
|
|
|
|
* @brief 切换清晰度
|
|
|
|
* @param quality 清晰度
|
|
|
|
* @param completion 切换结果
|
|
|
|
* { success 0 切换成功 -1切换失败 -2 切换频繁
|
|
|
|
* reason 错误原因 }
|
|
|
|
*
|
|
|
|
* 切换清晰度回调 - (void)HDReceivedVideoQuality:(NSDictionary *)dict;
|
|
|
|
* - (void)HDReceivedVideoAudioLines:(NSDictionary *)dict;
|
|
|
|
*/
|
|
|
|
- (void)changeQuality:(NSString *)quality completion:(void (^)(NSDictionary * results))completion;
|
|
|
|
/**
|
|
|
|
* The New Method (3.14.0)
|
|
|
|
* @brief 切换线路
|
|
|
|
* @param index 选择线路下标
|
|
|
|
* @param completion 切换结果
|
|
|
|
* { success 0 切换成功 -1切换失败 -2 切换频繁
|
|
|
|
* reason 错误原因 }
|
|
|
|
*
|
|
|
|
* 切换线路回调方法 - (void)HDReceivedVideoAudioLines:(NSDictionary *)dict;
|
|
|
|
*/
|
|
|
|
- (void)changeLine:(NSInteger)index completion:(void (^)(NSDictionary * results))completion;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.9 答题卡功能
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 开始答题
|
|
|
|
*/
|
|
|
|
- (void)start_vote:(NSInteger)count singleSelection:(BOOL)single;
|
|
|
|
/**
|
|
|
|
* @brief 结束答题
|
|
|
|
*/
|
|
|
|
- (void)stop_vote;
|
|
|
|
/**
|
|
|
|
* @brief 答题结果
|
|
|
|
* @param resultDic {answerCount //参与回答人数
|
|
|
|
correctOption //正确答案 (单选字符串,多选字符串数组)
|
|
|
|
statisics[{ //统计数组
|
|
|
|
count //选择当前选项人数
|
|
|
|
option //选项序号
|
|
|
|
percent //正确率 }]
|
|
|
|
voteCount //题目数量
|
|
|
|
voteId //题目ID
|
|
|
|
voteType //题目类型}
|
|
|
|
*/
|
|
|
|
- (void)vote_result:(NSDictionary *)resultDic;
|
|
|
|
/**
|
|
|
|
* @brief 收到打卡提交结果
|
|
|
|
* dic{
|
|
|
|
"success": true,
|
|
|
|
"data": {
|
|
|
|
"isRepeat": false//是否重复提交打卡
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
-(void)hdReceivedPunchResultWithDict:(NSDictionary *)dic;
|
|
|
|
/**
|
|
|
|
* @brief 收到开始打卡
|
|
|
|
* dic {
|
|
|
|
"punchId": "punchId",
|
|
|
|
"expireTime": "2019-10-26 10:00:00",
|
|
|
|
"remainDuration": 124
|
|
|
|
"tips" // 没有提示语则不返回该字段 (新增)
|
|
|
|
}
|
|
|
|
* 当没有设置时长,即无过期时间时
|
|
|
|
* {
|
|
|
|
"punchId": "asasdasdasdasd",
|
|
|
|
"remainDuration": -1 //其中-1表示剩余无限时间。
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
-(void)hdReceivedStartPunchWithDict:(NSDictionary *)dic;
|
|
|
|
/**
|
|
|
|
* @brief 收到结束打卡
|
|
|
|
* dic{
|
|
|
|
"punchId": "punchId"
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
-(void)hdReceivedEndPunchWithDict:(NSDictionary *)dic;
|
|
|
|
```
|
|
|
|
|
|
|
|
主动方法(可选)
|
|
|
|
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 答单选题
|
|
|
|
*/
|
|
|
|
-(void)reply_vote_single:(NSInteger)index;
|
|
|
|
/**
|
|
|
|
* @brief 答多选题
|
|
|
|
@param IndexArray [题目index,题目index] 例:[1,2]
|
|
|
|
*/
|
|
|
|
-(void)reply_vote_multiple:(NSMutableArray *)indexArray;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.10 问卷功能
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 发布问卷
|
|
|
|
*/
|
|
|
|
- (void)questionnaire_publish;
|
|
|
|
/**
|
|
|
|
* @brief 结束发布问卷
|
|
|
|
*/
|
|
|
|
- (void)questionnaire_publish_stop;
|
|
|
|
/**
|
|
|
|
* @brief 获取问卷详细内容
|
|
|
|
* @param detailDic { forcibly //1就是强制答卷,0为非强制答卷
|
|
|
|
id //问卷主键ID
|
|
|
|
subjects //包含的项目
|
|
|
|
submitedAction //1提交后查看答案,0为提交后不查看答案
|
|
|
|
title //标题 }
|
|
|
|
*/
|
|
|
|
- (void)questionnaireDetailInformation:(NSDictionary *)detailDic;
|
|
|
|
/**
|
|
|
|
* @brief 获取问卷统计
|
|
|
|
* @param staticsDic { forcibly //1就是强制答卷,0为非强制答卷
|
|
|
|
id //问卷主键ID
|
|
|
|
subjects //包含的项目
|
|
|
|
submitedAction //1提交后查看答案,0为提交后不查看答案
|
|
|
|
title //标题 }
|
|
|
|
*/
|
|
|
|
- (void)questionnaireStaticsInformation:(NSDictionary *)staticsDic;
|
|
|
|
/**
|
|
|
|
* @brief 提交问卷结果(成功,失败)
|
|
|
|
*/
|
|
|
|
- (void)commitQuestionnaireResult:(BOOL)success;
|
|
|
|
/**
|
|
|
|
* @brief 问卷功能
|
|
|
|
*/
|
|
|
|
- (void)questionnaireWithTitle:(NSString *)title url:(NSString *)url;
|
|
|
|
```
|
|
|
|
|
|
|
|
主动方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 提交问卷结果
|
|
|
|
* @param dic{subjectsAnswer[{selectedOptionId //选中选项ID
|
|
|
|
subjectId //题目ID}]}
|
|
|
|
*/
|
|
|
|
-(void)commitQuestionnaire:(NSDictionary *)dic;
|
|
|
|
/**
|
|
|
|
* @brief 主动请求问卷
|
|
|
|
*/
|
|
|
|
-(void)getPublishingQuestionnaire;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.11 广播功能
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 接收到发送的广播
|
|
|
|
* @param dic {content //广播内容
|
|
|
|
userid //发布者ID
|
|
|
|
username //发布者名字
|
|
|
|
userrole //发布者角色 }
|
|
|
|
*/
|
|
|
|
- (void)broadcast_msg:(NSDictionary *)dic;
|
|
|
|
/**
|
|
|
|
* @brief 接收到最后一条广播(直播中途进入,会返回最后一条广播)(会多次回调)
|
|
|
|
* @param array[{ content //广播内容
|
|
|
|
publisherId //发布者ID
|
|
|
|
publisherName //发布者名字
|
|
|
|
publisherRole //发布者角色
|
|
|
|
time //发布时间
|
|
|
|
}]
|
|
|
|
*/
|
|
|
|
- (void)broadcastLast_msg:(NSArray *)array;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief 删除广播
|
|
|
|
* @param dic 删除数据
|
|
|
|
dic {action //操作 1.删除
|
|
|
|
id //广播id }
|
|
|
|
*/
|
|
|
|
- (void)broadcast_delete:(NSDictionary *)dic;
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.12 签到功能
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 开始签到
|
|
|
|
*/
|
|
|
|
- (void)start_rollcall:(NSInteger)duration;
|
|
|
|
```
|
|
|
|
|
|
|
|
主动方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 签到
|
|
|
|
*/
|
|
|
|
-(void)answer_rollcall;
|
|
|
|
/**
|
|
|
|
提交打卡
|
|
|
|
|
|
|
|
@param punchId 打卡id
|
|
|
|
*/
|
|
|
|
- (void)hdCommitPunchWithPunchId:(NSString *)punchId;
|
|
|
|
/**
|
|
|
|
查询打卡信息
|
|
|
|
*/
|
|
|
|
- (void)hdInquirePunchInformation;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.13 抽奖功能
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 开始抽奖
|
|
|
|
*/
|
|
|
|
- (void)start_lottery;
|
|
|
|
/**
|
|
|
|
* @brief 抽奖结果
|
|
|
|
* remainNum 剩余奖品数
|
|
|
|
*/
|
|
|
|
- (void)lottery_resultWithCode:(NSString *)code myself:(BOOL)myself winnerName:(NSString *)winnerName remainNum:(NSInteger)remainNum;
|
|
|
|
/**
|
|
|
|
* @brief 退出抽奖
|
|
|
|
*/
|
|
|
|
- (void)stop_lottery;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.14 修改昵称
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 修改昵称
|
|
|
|
*/
|
|
|
|
- (void)onChangeNickname:(NSString *)nickNime;
|
|
|
|
```
|
|
|
|
|
|
|
|
主动方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 修改昵称
|
|
|
|
* @param nickName 修改后的昵称
|
|
|
|
*/
|
|
|
|
- (void)changeNickName:(NSString *)nickName;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.15 在线人数
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 收到在线人数
|
|
|
|
*/
|
|
|
|
- (void)onUserCount:(NSString *)count;
|
|
|
|
/**
|
|
|
|
收到老师列表
|
|
|
|
teachers = (
|
|
|
|
{
|
|
|
|
id = "";//老师id
|
|
|
|
ip = "";//IP地址
|
|
|
|
name = "";老师昵称
|
|
|
|
role = teacher;//角色
|
|
|
|
}
|
|
|
|
);
|
|
|
|
*/
|
|
|
|
-(void)onOnlineTeachers:(NSDictionary *)dic;
|
|
|
|
```
|
|
|
|
|
|
|
|
主动放法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
获取老师列表
|
|
|
|
*/
|
|
|
|
- (void)getOnlineTeachers;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.16 随堂测功能
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 接收到随堂测
|
|
|
|
* rseultDic 随堂测内容
|
|
|
|
resultDic {
|
|
|
|
isExist //是否存在正在发布的随堂测 1 存在 0 不存在
|
|
|
|
practice{
|
|
|
|
id //随堂测ID
|
|
|
|
isAnswered //是否已答题 true: 已答题, false: 未答题
|
|
|
|
options //选项数组
|
|
|
|
({
|
|
|
|
id //选项ID
|
|
|
|
index //选项索引
|
|
|
|
})
|
|
|
|
publishTime //随堂测发布时间
|
|
|
|
status //随堂测状态: 1 发布中 2 停止发布 3 已关闭
|
|
|
|
type //随堂测类型: 0 判断 1 单选 2 多选
|
|
|
|
submitRecord //如果已答题,返回该学员答题记录,如果未答题,服务端不返回该字段
|
|
|
|
({
|
|
|
|
optionId //选项ID
|
|
|
|
optionIndex //选项索引
|
|
|
|
})
|
|
|
|
}
|
|
|
|
serverTime //分发时间
|
|
|
|
|
|
|
|
}
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
-(void)receivePracticeWithDic:(NSDictionary *) resultDic;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief 随堂测提交结果
|
|
|
|
* rseultDic 提交结果,调用commitPracticeWithPracticeId:(NSString *)practiceId options:(NSArray *)options后执行
|
|
|
|
*
|
|
|
|
resultDic {datas {practice //随堂测
|
|
|
|
{ answerResult //回答是否正确 1 正确 0 错误
|
|
|
|
id //随堂测ID
|
|
|
|
isRepeatAnswered //是否重复答题 true: 重复答题, false: 第一次答题
|
|
|
|
options ({ count //参与人数
|
|
|
|
id //选项主键ID
|
|
|
|
index //选项序号
|
|
|
|
isCorrect //是否正确
|
|
|
|
percent //选项占比})
|
|
|
|
submitRecord 如果重复答题,则返回该学员第一次提交的记录,否则,返回该学员当前提交记录
|
|
|
|
({ optionId //提交记录 提交选项ID
|
|
|
|
optionIndex //提交选项序号})
|
|
|
|
type //随堂测类型: 0 判断 1 单选 2 多选}}}
|
|
|
|
*/
|
|
|
|
-(void)practiceSubmitResultsWithDic:(NSDictionary *) resultDic;
|
|
|
|
/**
|
|
|
|
* @brief 随堂测统计结果
|
|
|
|
* rseultDic 统计结果,调用getPracticeStatisWithPracticeId:(NSString *)practiceId后执行
|
|
|
|
resultDic {practice { //随堂测
|
|
|
|
answerPersonNum //回答该随堂测的人数
|
|
|
|
correctPersonNum //回答正确的人数
|
|
|
|
correctRate //正确率
|
|
|
|
id //随堂测ID
|
|
|
|
options ({ //选项数组
|
|
|
|
count //选择该选项的人数
|
|
|
|
id //选项ID
|
|
|
|
index //选项序号
|
|
|
|
isCorrect //是否为正确选项 1 正确 0 错误
|
|
|
|
percent //选择该选项的百分比})
|
|
|
|
status //随堂测状态 1 发布中 2 停止发布
|
|
|
|
type //随堂测类型: 0 判断 1 单选 2 多选}}
|
|
|
|
*/
|
|
|
|
-(void)practiceStatisResultsWithDic:(NSDictionary *) resultDic;
|
|
|
|
/**
|
|
|
|
* @brief 随堂测排名结果
|
|
|
|
* rseultDic 排名结果,调用getPracticeRankWithPracticeId:(NSString *)practiceId后执行
|
|
|
|
ressult{practice { //随堂测
|
|
|
|
id //随堂测主键ID
|
|
|
|
ranking ({ //排名
|
|
|
|
costTime //回答用时
|
|
|
|
viewerId //用户ID
|
|
|
|
viewerName //用户名})}}
|
|
|
|
*/
|
|
|
|
-(void)practiceRankResultsWithDic:(NSDictionary *) resultDic;
|
|
|
|
/**
|
|
|
|
* @brief 停止随堂测
|
|
|
|
* rseultDic 结果
|
|
|
|
* resultDic {practiceId //随堂测主键ID}
|
|
|
|
*/
|
|
|
|
-(void)practiceStopWithDic:(NSDictionary *) resultDic;
|
|
|
|
/**
|
|
|
|
* @brief 关闭随堂测
|
|
|
|
* rseultDic 结果
|
|
|
|
* resultDic {practiceId //随堂测主键ID}
|
|
|
|
*/
|
|
|
|
-(void)practiceCloseWithDic:(NSDictionary *) resultDic;
|
|
|
|
/**
|
|
|
|
* @brief 收到奖杯
|
|
|
|
* dic 结果
|
|
|
|
* "type": 1 奖杯 2 其他
|
|
|
|
* "viewerName": 获奖用户名
|
|
|
|
* "viewerId": 获奖用户ID
|
|
|
|
*/
|
|
|
|
-(void)prize_sendWithDict:(NSDictionary *)dic;
|
|
|
|
```
|
|
|
|
|
|
|
|
主动方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 提交随堂测
|
|
|
|
* @param practiceId 随堂测ID
|
|
|
|
* @param options 选项ID
|
|
|
|
*/
|
|
|
|
- (void)commitPracticeWithPracticeId:(NSString *)practiceId options:(NSArray *)options;
|
|
|
|
/**
|
|
|
|
* @brief 获取随堂测统计信息(可多次调用)
|
|
|
|
* @param practiceId 随堂测ID
|
|
|
|
*/
|
|
|
|
-(void)getPracticeStatisWithPracticeId:(NSString *)practiceId;
|
|
|
|
/**
|
|
|
|
* @brief 获取随堂测排名(可多次调用)
|
|
|
|
* @param practiceId 随堂测ID
|
|
|
|
*/
|
|
|
|
-(void)getPracticeRankWithPracticeId:(NSString *)practiceId;
|
|
|
|
/**
|
|
|
|
* @brief 获取随堂测
|
|
|
|
* @param practiceId 随堂测ID(没有传@"")
|
|
|
|
*/
|
|
|
|
-(void)getPracticeInformation:(NSString *)practiceId;
|
|
|
|
```
|
|
|
|
|
|
|
|
## 3.17 公告
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 公告
|
|
|
|
*/
|
|
|
|
- (void)announcement:(NSString *)str;
|
|
|
|
/**
|
|
|
|
* @brief 监听到有公告消息
|
|
|
|
* @dict {action //action 返回release 取出公告内容,action 返回remove 删除公告
|
|
|
|
announcement //公告内容}
|
|
|
|
*/
|
|
|
|
- (void)on_announcement:(NSDictionary *)dict;
|
|
|
|
```
|
|
|
|
|
|
|
|
## 3.18 跑马灯
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 跑马灯
|
|
|
|
* @param dic action [{ //事件
|
|
|
|
duration //执行时间
|
|
|
|
end { //结束位置
|
|
|
|
alpha //透明度
|
|
|
|
xpos //x坐标
|
|
|
|
ypos //y坐标 },
|
|
|
|
start { //开始位置
|
|
|
|
alpha //透明度
|
|
|
|
xpos //x坐标
|
|
|
|
ypos //y坐标}]
|
|
|
|
image { //包含图片
|
|
|
|
height //图片高度
|
|
|
|
image_url //地址
|
|
|
|
width //图片宽度}
|
|
|
|
loop //循环次数 -1 无限循环
|
|
|
|
text { //文字信息
|
|
|
|
color //文字颜色
|
|
|
|
content //文字内容
|
|
|
|
font_size //字体大小}
|
|
|
|
type //当前类型 text 文本 image 图片
|
|
|
|
*/
|
|
|
|
-(void)receivedMarqueeInfo:(NSDictionary *)dic;
|
|
|
|
```
|
|
|
|
|
|
|
|
## 3.19 播放器状态
|
|
|
|
|
|
|
|
播放器状态类型
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* 视频播放状态
|
|
|
|
* HDMoviePlaybackStateStopped 播放停止
|
|
|
|
* HDMoviePlaybackStatePlaying 开始播放
|
|
|
|
* HDMoviePlaybackStatePaused 暂停播放
|
|
|
|
* HDMoviePlaybackStateInterrupted 播放间断
|
|
|
|
* HDMoviePlaybackStateSeekingForward 播放快进
|
|
|
|
* HDMoviePlaybackStateSeekingBackward 播放后退
|
|
|
|
*/
|
|
|
|
typedef NS_ENUM(NSUInteger, HDMoviePlaybackState) {
|
|
|
|
HDMoviePlaybackStateStopped,
|
|
|
|
HDMoviePlaybackStatePlaying,
|
|
|
|
HDMoviePlaybackStatePaused,
|
|
|
|
HDMoviePlaybackStateInterrupted,
|
|
|
|
HDMoviePlaybackStateSeekingForward,
|
|
|
|
HDMoviePlaybackStateSeekingBackward,
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 视频加载状态
|
|
|
|
* HDMovieLoadStateUnknown 未知状态
|
|
|
|
* HDMovieLoadStatePlayable 视频未完成全部缓冲,但已缓冲的数据可以进行播放
|
|
|
|
* HDMovieLoadStatePlaythroughOK 缓冲已经完成
|
|
|
|
* HDMovieLoadStateStalled 缓冲已经开始
|
|
|
|
*/
|
|
|
|
typedef NS_ENUM(NSUInteger, HDMovieLoadState) {
|
|
|
|
HDMovieLoadStateUnknown,
|
|
|
|
HDMovieLoadStatePlayable,
|
|
|
|
HDMovieLoadStatePlaythroughOK,
|
|
|
|
HDMovieLoadStateStalled,
|
|
|
|
};
|
|
|
|
```
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 视频状态改变
|
|
|
|
* @param state
|
|
|
|
* HDMoviePlaybackStateStopped 播放停止
|
|
|
|
* HDMoviePlaybackStatePlaying 开始播放
|
|
|
|
* HDMoviePlaybackStatePaused 暂停播放
|
|
|
|
* HDMoviePlaybackStateInterrupted 播放间断
|
|
|
|
* HDMoviePlaybackStateSeekingForward 播放快进
|
|
|
|
* HDMoviePlaybackStateSeekingBackward 播放后退
|
|
|
|
*/
|
|
|
|
- (void)HDMoviePlayBackStateDidChange:(HDMoviePlaybackState)state;
|
|
|
|
/**
|
|
|
|
* @brief 视频加载状态
|
|
|
|
* @param state 播放状态
|
|
|
|
* HDMovieLoadStateUnknown 未知状态
|
|
|
|
* HDMovieLoadStatePlayable 视频未完成全部缓存,但已缓存的数据可以进行播放
|
|
|
|
* HDMovieLoadStatePlaythroughOK 完成缓存
|
|
|
|
* HDMovieLoadStateStalled 数据缓存已经停止,播放将暂停
|
|
|
|
*/
|
|
|
|
- (void)HDMovieLoadStateDidChange:(HDMovieLoadState)state;
|
|
|
|
/**
|
|
|
|
* @brief 播放器初始化完成 (会多次回调)
|
|
|
|
*/
|
|
|
|
- (void)HDMediaPlaybackIsPreparedToPlayDidChange:(NSDictionary *)dict;
|
|
|
|
```
|
|
|
|
|
|
|
|
## 3.20 视频缓存速度
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 视频加载速度
|
|
|
|
* @param speed 视频加载速度字符串
|
|
|
|
*/
|
|
|
|
- (void)onBufferSpeed:(NSString *)speed;
|
|
|
|
```
|
|
|
|
|
|
|
|
## 3.21 用户进出直播间提醒
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 用户进出直播间提示
|
|
|
|
* @param model RemindModel 详情
|
|
|
|
*/
|
|
|
|
- (void)HDUserRemindWithModel:(RemindModel *)model;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.22 抽奖2.0功能 (该功能需单独开启)
|
|
|
|
|
|
|
|
代理方法(可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 抽奖2.0 抽奖信息回调 (该功能需要单独开启)
|
|
|
|
* @param model NewLotteryMessageModel 详情
|
|
|
|
*/
|
|
|
|
- (void)HDOnLotteryWithModel:(NewLotteryMessageModel *)model;
|
|
|
|
```
|
|
|
|
|
|
|
|
主动方法 (可选)
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 抽奖2.0 查询抽奖状态
|
|
|
|
*/
|
|
|
|
- (void)queryLotteryStatus;
|
|
|
|
/**
|
|
|
|
* @brief 抽奖2.0 提交中奖用户信息
|
|
|
|
* @param collectInfos 用户信息
|
|
|
|
* collectInfos = @[@{@"index":@(0),@"value":@""}];
|
|
|
|
* @param lotteryId 中奖订单ID (非必选)
|
|
|
|
* @param completion 请求结果回调
|
|
|
|
*/
|
|
|
|
- (void)commitLottery:(NSArray *)collectInfos lotteryId:(NSString *)lotteryId completion:(void (^)(BOOL success))completion;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 4.常见问题
|
|
|
|
|
|
|
|
## 4.1 旋转屏错误
|
|
|
|
|
|
|
|
常用的旋转屏方式
|
|
|
|
|
|
|
|
第一个方法决定是否支持多方向旋转屏,如果返回NO则后面的两个方法都不会再被调用,而且只会支持默认的UIInterfaceOrientationMaskPortrait方向;
|
|
|
|
|
|
|
|
第二个方法直接返回支持的旋转方向,该方法在iPad上的默认返回值是UIInterfaceOrientationMaskAll,iPhone上的默认返回值是UIInterfaceOrientationMaskAllButUpsideDown,官方文档有说明
|
|
|
|
|
|
|
|
第三个方法返回最优先显示的屏幕方向,比如同时支持Portrait和Landscape方向,但想优先显示Landscape方向,那软件启动的时候就会先显示Landscape,在手机切换旋转方向的时候仍然可以在Portrait和Landscape之间切换
|
|
|
|
|
|
|
|
HD云直播的页面跳转均是采用模态形式跳转
|
|
|
|
|
|
|
|
```objc
|
|
|
|
- (void)presentViewController:(UIViewController *)viewControllerToPresent animated: (BOOL)flag completion:(void (^ __nullable)(void))completion NS_AVAILABLE_IOS(5_0);
|
|
|
|
```
|
|
|
|
|
|
|
|
在每个控制器或者基类控制器设置旋转选项
|
|
|
|
|
|
|
|
```objc
|
|
|
|
#pragma mark - 屏幕旋转
|
|
|
|
- (BOOL)shouldAutorotate{
|
|
|
|
return NO;//该旋转的页面自己变量控制
|
|
|
|
}
|
|
|
|
|
|
|
|
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
|
|
|
|
{
|
|
|
|
return UIInterfaceOrientationPortrait;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
|
|
|
|
{
|
|
|
|
return UIInterfaceOrientationMaskPortrait;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## 4.2 Swift实现代理错误
|
|
|
|
|
|
|
|
```swift
|
|
|
|
//初始化
|
|
|
|
let parameter = PlayParameter.init()
|
|
|
|
/**
|
|
|
|
*配置各种参数
|
|
|
|
*/
|
|
|
|
//守护代理
|
|
|
|
guard let player = RequestData else {
|
|
|
|
return}
|
|
|
|
player.delegate = self
|
|
|
|
```
|
|
|
|
|
|
|
|
## 4.3 查看手机日志
|
|
|
|
|
|
|
|
首先: 在AppDelegate中写如下代码(仅限CCSDK);
|
|
|
|
|
|
|
|
```objc
|
|
|
|
[[SaveLogUtil sharedInstance]isNeedToSaveLog:YES];
|
|
|
|
```
|
|
|
|
|
|
|
|
第一步:选择Windows下面的Devices and Simulators
|
|
|
|
|
|
|
|
第二步:点击Devices and Simulators 会出现手机信息以及测试的INSTALLED APPS, 点击设置(齿轮图标) 会出现三个选项, 选择Download Container...
|
|
|
|
|
|
|
|
第三步: 点击Download Container... 下载并保存日志文件,打开文件找到XXLog文件里面就是相关的打印日志
|
|
|
|
|
|
|
|
第四步:这里可以看到相关的请求信息和打印日志, 也可以判断错误原因
|
|
|
|
|
|
|
|
## 4.4 编译失败和打包上架打包失败
|
|
|
|
|
|
|
|
错误大意为
|
|
|
|
|
|
|
|
```
|
|
|
|
Failed to verify bitcode in xxxxx
|
|
|
|
error: Bundle only contains bitcode-marker /var/folders/s5/lnk362pd4cs0lmtn_43ppjzw0000gn/T/XcodeDistPipeline.2TS/Root/Payload/268YK.appxxxxxxxxxx (armv7)
|
|
|
|
```
|
|
|
|
|
|
|
|
解决办法:
|
|
|
|
|
|
|
|
第一步: xcode -> file -> Workspace Settings
|
|
|
|
|
|
|
|
第二步: Shared Workspace Settings:
|
|
|
|
|
|
|
|
第三步:Build System -> Legacy Build System
|
|
|
|
|
|
|
|
## 4.5 提交问卷的格式
|
|
|
|
|
|
|
|
主动提交问卷这个方法参数格式
|
|
|
|
|
|
|
|
```objective-c
|
|
|
|
-(void)commitQuestionnaire:(NSDictionary *)dic
|
|
|
|
```
|
|
|
|
|
|
|
|
```objc
|
|
|
|
{
|
|
|
|
subjectsAnswer = (
|
|
|
|
{
|
|
|
|
//单选
|
|
|
|
selectedOptionId = 6DBB147BC4EF99A7;
|
|
|
|
subjectId = 5DEEA9F9FD1DDFAD;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
//多选
|
|
|
|
selectedOptionIds = "A2F4436135131236,1A8C59C6F3A774F5";
|
|
|
|
subjectId = 658A573395F3E00D;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
//问答
|
|
|
|
answerContent = Qqq;
|
|
|
|
subjectId = 10F9E9D82094F36C;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## 4.6 关于api回调所在线程问题
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 文档加载状态(会在子线程回调)
|
|
|
|
* index
|
|
|
|
* 0 文档组件初始化完成
|
|
|
|
* 1 动画文档加载完成
|
|
|
|
* 2 非动画文档加载完成
|
|
|
|
* 3文档组件加载失败
|
|
|
|
* 4文档图片加载失败
|
|
|
|
* 5文档动画加载失败
|
|
|
|
* 6画板加载失败
|
|
|
|
*/
|
|
|
|
- (void)docLoadCompleteWithIndex:(NSInteger)index;
|
|
|
|
```
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 获取ppt当前页数和总页数 (会多次回调) (会在子线程回调)
|
|
|
|
*
|
|
|
|
* 回调当前翻页的页数信息
|
|
|
|
* 白板docTotalPage一直为0, pageNum从1开始
|
|
|
|
* 其他文档docTotalPage为正常页数,pageNum从0开始
|
|
|
|
* @param dictionary 翻页信息
|
|
|
|
*/
|
|
|
|
- (void)onPageChange:(NSDictionary *) dictionary;
|
|
|
|
```
|
|
|
|
|
|
|
|
PS:直播、在线回放只有上述api会在子线程回调,其余的api均在主线程进行回调。 |
|
|
|
\ No newline at end of file |