... | @@ -445,6 +445,7 @@ done |
... | @@ -445,6 +445,7 @@ done |
|
*/
|
|
*/
|
|
- (id)initLoginWithParameter:(PlayParameter *)parameter;
|
|
- (id)initLoginWithParameter:(PlayParameter *)parameter;
|
|
|
|
|
|
|
|
|
|
/// 初始化SDK
|
|
/// 初始化SDK
|
|
/// @param parameter 参数
|
|
/// @param parameter 参数
|
|
/// @param succed 初始化成功回调
|
|
/// @param succed 初始化成功回调
|
... | @@ -456,7 +457,45 @@ done |
... | @@ -456,7 +457,45 @@ done |
|
failed:(initFailedClosure)failed;
|
|
failed:(initFailedClosure)failed;
|
|
```
|
|
```
|
|
|
|
|
|
始化SDK(新)
|
|
初始化SDK(旧)( 仅 3.x.x 版本可用 )
|
|
|
|
|
|
|
|
| 方法 | 注释 |
|
|
|
|
| --------------------------------------- | -------------------------------------- |
|
|
|
|
| (id)initWithParameter:(PlayParameter *) | 进入房间,并请求画图聊天数据并播放视频 |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief 进入房间,并请求画图聊天数据并播放视频(可以不登陆,直接从此接口进入直播间)
|
|
|
|
* @param parameter 配置参数信息
|
|
|
|
* 必填参数 userId; //用户ID
|
|
|
|
* 必填参数 roomId; //房间ID
|
|
|
|
* 必填参数 viewerName; //用户名称
|
|
|
|
* 必填参数 token; //房间密码
|
|
|
|
* 必填参数 docParent; //文档父类窗口
|
|
|
|
* 必填参数 docFrame; //文档区域
|
|
|
|
* 必填参数 playerParent; //视频父类窗口
|
|
|
|
* 必填参数 playerFrame; //视频区域
|
|
|
|
* 必填参数 scalingMode; //屏幕适配方式
|
|
|
|
* (已弃用!) security //是否使用https
|
|
|
|
* 必填参数 defaultColor; //ppt默认底色,不写默认为白色
|
|
|
|
* 必填参数 PPTScalingMode; //PPT适配方式
|
|
|
|
PPT适配模式分为四种,
|
|
|
|
1.拉伸填充,PPT内容全部展示在显示区域,会被拉伸或压缩,不会存在黑边
|
|
|
|
2.等比居中,PPT内容保持原始比例,适应窗口展示在显示区域,会存在黑边
|
|
|
|
3.等比填充,PPT内容保持原始比例,以横向或纵向适应显示区域,另一方向将会超出显示区域,超出部分会被裁减,不会存在黑边
|
|
|
|
4.根据直播间文档显示模式的返回值进行设置(推荐)
|
|
|
|
* 必填参数 pauseInBackGround; //后台是否继续播放,
|
|
|
|
* 注意:如果开启后台播放需要打开 xcode->Capabilities->Background Modes->on->Audio,AirPlay,and Picture in Picture
|
|
|
|
* (选填参数)viewercustomua; //用户自定义参数,需和后台协商,没有定制传@""
|
|
|
|
*/
|
|
|
|
- (id)initWithParameter:(PlayParameter *)parameter;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
初始化SDK(新)(仅 4.x.x 版本可用)
|
|
|
|
|
|
| 方法 | 注释 |
|
|
| 方法 | 注释 |
|
|
| ------------------------------------------------- | --------- |
|
|
| ------------------------------------------------- | --------- |
|
... | @@ -941,6 +980,87 @@ typedef void (^pullStreamFailedClosure)(HDSMediaCallError error); // 拉远端 |
... | @@ -941,6 +980,87 @@ typedef void (^pullStreamFailedClosure)(HDSMediaCallError error); // 拉远端 |
|
@property (nonatomic, copy) NSString * _Nullable message;
|
|
@property (nonatomic, copy) NSString * _Nullable message;
|
|
```
|
|
```
|
|
|
|
|
|
|
|
新增 HDSHistoryTopChatModel 类
|
|
|
|
|
|
|
|
| 参数 | 类型 | 说明 | 所在类 |
|
|
|
|
| ------- | ----- | ---------------- | --------------------- |
|
|
|
|
| records | Array | 房间置顶聊天记录 | CCSDK/PlayParameter.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
@interface HDSHistoryTopChatModel : NSObject
|
|
|
|
/// 房间置顶聊天记录
|
|
|
|
@property (nonatomic, strong) NSArray <HDSLiveTopChatModel *>* _Nullable records;
|
|
|
|
|
|
|
|
@end
|
|
|
|
```
|
|
|
|
|
|
|
|
新增 HDSHistoryTopChatModel 类
|
|
|
|
|
|
|
|
| 参数 | 类型 | 说明 | 所在类 |
|
|
|
|
| ----------------- | ------- | ------------------ | --------------------- |
|
|
|
|
| id | String | 聊天ID | CCSDK/PlayParameter.h |
|
|
|
|
| content | String | 聊天内容 | CCSDK/PlayParameter.h |
|
|
|
|
| fromViewerId | String | 聊天发送人Id | CCSDK/PlayParameter.h |
|
|
|
|
| fromViewerName | String | 聊天发送人昵称 | CCSDK/PlayParameter.h |
|
|
|
|
| fromViewerAvatar | String | 聊天发送人头像 | CCSDK/PlayParameter.h |
|
|
|
|
| fromViewerGroupId | String | 聊天发送人聊天组Id | CCSDK/PlayParameter.h |
|
|
|
|
| fromViewerRole | Integer | 聊天发送人角色 | CCSDK/PlayParameter.h |
|
|
|
|
| top | Integer | 操作时间戳 | CCSDK/PlayParameter.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
@interface HDSLiveTopChatModel : NSObject
|
|
|
|
/// 聊天Id
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable id;
|
|
|
|
/// 聊天内容
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable content;
|
|
|
|
/// 聊天发送人Id
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable fromViewerId;
|
|
|
|
/// 聊天发送人昵称
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable fromViewerName;
|
|
|
|
/// 聊天发送人头像
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable fromViewerAvatar;
|
|
|
|
/// 聊天发送人聊天组Id
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable fromViewerGroupId;
|
|
|
|
/// 聊天发送人角色
|
|
|
|
/// 1 : publisher (主讲、推流端角色)
|
|
|
|
/// 2 : teacher (助教端角色)
|
|
|
|
/// 3 : host (主持人角色)
|
|
|
|
/// 4 : student (学生、观看端角色)
|
|
|
|
/// 10 : presenter (云课堂讲师)
|
|
|
|
/// 11 : talker (云课堂互动者)
|
|
|
|
/// 12 : audience (云课堂旁听)
|
|
|
|
/// 13 : inspector (云课堂隐身者)
|
|
|
|
/// 14 : assistant (云课堂助教)
|
|
|
|
/// 0 : other (其他角色)
|
|
|
|
@property (nonatomic, assign) NSInteger fromViewerRole;
|
|
|
|
/// 操作时间戳
|
|
|
|
@property (nonatomic, assign) NSInteger top;
|
|
|
|
|
|
|
|
@end
|
|
|
|
```
|
|
|
|
|
|
|
|
新增 HDSDeleteTopChatModel 类
|
|
|
|
|
|
|
|
| 参数 | 类型 | 说明 | 所在类 |
|
|
|
|
| ------- | ----- | ---------------------- | --------------------- |
|
|
|
|
| chatIds | Array | 收到批量置顶聊天记录ID | CCSDK/PlayParameter.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
@interface HDSDeleteTopChatModel : NSObject
|
|
|
|
/// 收到批量
|
|
|
|
@property (nonatomic, strong) NSArray <NSString *>* _Nullable chatIds;
|
|
|
|
|
|
|
|
@end
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
开始配置
|
|
开始配置
|
... | @@ -1136,6 +1256,25 @@ typedef void (^pullStreamFailedClosure)(HDSMediaCallError error); // 拉远端 |
... | @@ -1136,6 +1256,25 @@ typedef void (^pullStreamFailedClosure)(HDSMediaCallError error); // 拉远端 |
|
- (void)requestCancel;
|
|
- (void)requestCancel;
|
|
```
|
|
```
|
|
|
|
|
|
|
|
主动获取直播状态(主动方法)
|
|
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
|
| ---------------------------------- | ---------------- | ------------------- |
|
|
|
|
| (void)getLiveStatusSucced: failed: | 主动获取直播状态 | CCSDK/RequestData.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/// 4.8.0 new
|
|
|
|
/// 主动获取直播状态
|
|
|
|
/// @param succedClosure 收到播放直播状态 0.正在直播 1.未开始直播
|
|
|
|
/// @param failedClosure 错误信息
|
|
|
|
- (void)getLiveStatusSucced:(void (^)(NSInteger status))succedClosure
|
|
|
|
failed:(void (^)(NSString *message))failedClosure;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.3 文档功能
|
|
## 3.3 文档功能
|
|
|
|
|
|
3.3.1 代理方法(可选)
|
|
3.3.1 代理方法(可选)
|
... | @@ -2774,6 +2913,192 @@ typedef NS_ENUM(NSUInteger, HDSMediaLoadState) { |
... | @@ -2774,6 +2913,192 @@ typedef NS_ENUM(NSUInteger, HDSMediaLoadState) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.24 聊天置顶
|
|
|
|
|
|
|
|
### 房间历史置顶聊天(代理方法)
|
|
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
|
| ------------------------------ | -------------------- | ------------------- |
|
|
|
|
| (void)onHistoryTopChatRecords: | 房间历史置顶聊天记录 | CCSDK/RequestData.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/// 4.8.0 new
|
|
|
|
/// 房间历史置顶聊天记录
|
|
|
|
/// @param model 置顶聊天model
|
|
|
|
- (void)onHistoryTopChatRecords:(HDSHistoryTopChatModel *)model;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### HDSHistoryTopChatModel
|
|
|
|
|
|
|
|
| 参数 | 类型 | 说明 | 所在类 |
|
|
|
|
| ------- | ----- | ---------------- | --------------------- |
|
|
|
|
| records | Array | 房间置顶聊天记录 | CCSDK/PlayParameter.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
@interface HDSHistoryTopChatModel : NSObject
|
|
|
|
/// 房间置顶聊天记录
|
|
|
|
@property (nonatomic, strong) NSArray <HDSLiveTopChatModel *>* _Nullable records;
|
|
|
|
|
|
|
|
@end
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 收到新的置顶聊天(代理方法)
|
|
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
|
| ------------------------- | ------------------ | ------------------- |
|
|
|
|
| (void)receivedNewTopChat: | 收到聊天置顶新消息 | CCSDK/RequestData.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/// 4.8.0 new
|
|
|
|
/// 收到聊天置顶新消息
|
|
|
|
/// @param model 聊天置顶model
|
|
|
|
- (void)receivedNewTopChat:(HDSLiveTopChatModel *)model;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### HDSLiveTopChatModel
|
|
|
|
|
|
|
|
| 参数 | 类型 | 说明 | 所在类 |
|
|
|
|
| ----------------- | ------- | ------------------ | --------------------- |
|
|
|
|
| id | String | 聊天ID | CCSDK/PlayParameter.h |
|
|
|
|
| content | String | 聊天内容 | CCSDK/PlayParameter.h |
|
|
|
|
| fromViewerId | String | 聊天发送人Id | CCSDK/PlayParameter.h |
|
|
|
|
| fromViewerName | String | 聊天发送人昵称 | CCSDK/PlayParameter.h |
|
|
|
|
| fromViewerAvatar | String | 聊天发送人头像 | CCSDK/PlayParameter.h |
|
|
|
|
| fromViewerGroupId | String | 聊天发送人聊天组Id | CCSDK/PlayParameter.h |
|
|
|
|
| fromViewerRole | Integer | 聊天发送人角色 | CCSDK/PlayParameter.h |
|
|
|
|
| top | Integer | 操作时间戳 | CCSDK/PlayParameter.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
@interface HDSLiveTopChatModel : NSObject
|
|
|
|
/// 聊天Id
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable id;
|
|
|
|
/// 聊天内容
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable content;
|
|
|
|
/// 聊天发送人Id
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable fromViewerId;
|
|
|
|
/// 聊天发送人昵称
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable fromViewerName;
|
|
|
|
/// 聊天发送人头像
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable fromViewerAvatar;
|
|
|
|
/// 聊天发送人聊天组Id
|
|
|
|
@property (nonatomic, copy) NSString * _Nullable fromViewerGroupId;
|
|
|
|
/// 聊天发送人角色
|
|
|
|
/// 1 : publisher (主讲、推流端角色)
|
|
|
|
/// 2 : teacher (助教端角色)
|
|
|
|
/// 3 : host (主持人角色)
|
|
|
|
/// 4 : student (学生、观看端角色)
|
|
|
|
/// 10 : presenter (云课堂讲师)
|
|
|
|
/// 11 : talker (云课堂互动者)
|
|
|
|
/// 12 : audience (云课堂旁听)
|
|
|
|
/// 13 : inspector (云课堂隐身者)
|
|
|
|
/// 14 : assistant (云课堂助教)
|
|
|
|
/// 0 : other (其他角色)
|
|
|
|
@property (nonatomic, assign) NSInteger fromViewerRole;
|
|
|
|
/// 操作时间戳
|
|
|
|
@property (nonatomic, assign) NSInteger top;
|
|
|
|
|
|
|
|
@end
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 收到批量删除聊天置顶(代理方法)
|
|
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
|
| ---------------------------- | ------------------------ | ------------------- |
|
|
|
|
| (void)receivedDeleteTopChat: | 收到批量删除聊天置顶消息 | CCSDK/RequestData.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/// 4.8.0 new
|
|
|
|
/// 收到批量删除聊天置顶消息
|
|
|
|
/// @param model 聊天置顶model
|
|
|
|
- (void)receivedDeleteTopChat:(HDSDeleteTopChatModel *)model;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### HDSDeleteTopChatModel
|
|
|
|
|
|
|
|
| 参数 | 类型 | 说明 | 所在类 |
|
|
|
|
| ------- | ----- | ---------------------- | --------------------- |
|
|
|
|
| chatIds | Array | 收到批量置顶聊天记录ID | CCSDK/PlayParameter.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
@interface HDSDeleteTopChatModel : NSObject
|
|
|
|
/// 收到批量
|
|
|
|
@property (nonatomic, strong) NSArray <NSString *>* _Nullable chatIds;
|
|
|
|
|
|
|
|
@end
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.25 播放器静音
|
|
|
|
|
|
|
|
### 获取播放器静音状态(主动方法)
|
|
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
|
| -------------------------- | ---------------------- | ------------------- |
|
|
|
|
| (void)getPlayerMuteStatus: | 获取当前播放器静音状态 | CCSDK/RequestData.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/// 4.8.0 new
|
|
|
|
/// 获取当前播放器静音状态
|
|
|
|
/// @param closure YES 静音中 NO 未静音
|
|
|
|
- (void)getPlayerMuteStatus:(void(^)(BOOL status))closure;
|
|
|
|
```
|
|
|
|
|
|
|
|
### 主动操作播放器静音操作(主动方法)
|
|
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
|
| ------------------------------- | ---------------------- | ------------------- |
|
|
|
|
| (void)mutePlayerVoice: closure: | 主动操作播放器静音操作 | CCSDK/RequestData.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/// 4.8.0 new
|
|
|
|
/// 主动操作播放器静音操作
|
|
|
|
/// @param result result YES 静音 NO 解除静音
|
|
|
|
/// @param closure 操作回调
|
|
|
|
- (void)mutePlayerVoice:(BOOL)result closure:(void(^)(BOOL result))closure;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 3.26 房间图标
|
|
|
|
|
|
|
|
### 房间图标(代理方法)
|
|
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
|
| --------------- | -------- | ------------------- |
|
|
|
|
| (void)roomIcon: | 房间图标 | CCSDK/RequestData.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/// 4.8.0 new
|
|
|
|
/// 房间图标
|
|
|
|
/// @param iconUrl 图标地址
|
|
|
|
- (void)roomIcon:(NSString *)iconUrl;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 4.常见问题
|
|
# 4.常见问题
|
... | | ... | |