... | ... | @@ -12,6 +12,273 @@ PS. 关于Xcode12最低版本支持 iOS 9.0 ,如何联调 iOS 8.0 设备? |
|
|
|
|
|
|
|
|
|
|
|
## 4.8.0
|
|
|
|
|
|
发布日期:2023.02.15
|
|
|
|
|
|
1. 新增竖屏观看功能
|
|
|
2. 加入聊天置顶功能
|
|
|
3. 优化公告的显示和阅读
|
|
|
4. 直播带货支持多平台链接
|
|
|
5. 优化demo邀请卡
|
|
|
6. 优化播放器和回放文档画笔下载
|
|
|
|
|
|
### ‼️ **本地集成 ‘必须’ 的准备 : 替换 CCBundle 资源文件,替换 HDBaseUtils 库,替换 CCSDK 库**
|
|
|
|
|
|
### ‼️ **注意事项: HDBaseUtils 需升级到 1.2.0**
|
|
|
|
|
|
### ‼️ **PS: 直播带货支持多平台链接改动详情见《云直播直播带货功能接入文档》**
|
|
|
|
|
|
|
|
|
|
|
|
### 直播新增API:
|
|
|
|
|
|
#### 房间图标(代理方法)
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
| --------------- | -------- | ------------------- |
|
|
|
| (void)roomIcon: | 房间图标 | CCSDK/RequestData.h |
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
```objc
|
|
|
/// 4.8.0 new
|
|
|
/// 房间图标
|
|
|
/// @param iconUrl 图标地址
|
|
|
- (void)roomIcon:(NSString *)iconUrl;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### 聊天置顶
|
|
|
|
|
|
##### 房间历史置顶聊天(代理方法)
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
| ------------------------------ | -------------------- | ------------------- |
|
|
|
| (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
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### 获取播放器静音状态(主动方法)
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
| -------------------------- | ---------------------- | ------------------- |
|
|
|
| (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;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### 主动获取直播状态(主动方法)
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
| ---------------------------------- | ---------------- | ------------------- |
|
|
|
| (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;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### 在线回放新增API:
|
|
|
|
|
|
#### 设置播放器核心(属性)
|
|
|
|
|
|
| 参数 | 类型 | 说明 | 所在类 |
|
|
|
| ---------------- | ---- | ------------------------------------------------- | --------------------- |
|
|
|
| playbackCoreType | Enum | 在线回放播放核心(默认:PlaybackCoreTypeDefualt) | CCSDK/PlayParameter.h |
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
```objc
|
|
|
/// 在线回放播放器核心
|
|
|
typedef NS_ENUM(NSUInteger, PlaybackCoreType) {
|
|
|
///使用HDSMedia播放器(默认)
|
|
|
PlaybackCoreTypeDefualt,
|
|
|
///使用系统AVPlayer播放器
|
|
|
PlaybackCoreTypeOrigin,
|
|
|
};
|
|
|
|
|
|
/// 在线回放播放核心(默认:PlaybackCoreTypeDefualt)
|
|
|
@property (nonatomic, assign) PlaybackCoreType playbackCoreType;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### 回调单个聊天文件数据 (会多次回调)(代理方法)
|
|
|
|
|
|
| 方法 | 说明 | 所在类 |
|
|
|
| ---------------------------- | ----------------------------------- | --------------------------- |
|
|
|
| (void)didReceiveChatMessage: | 回调单个聊天文件数据 (会多次回调) | CCSDK/RequestDataPlayBack.h |
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
```objc
|
|
|
/// 回调单个聊天文件数据 (会多次回调)
|
|
|
/// @param chats 聊天数组
|
|
|
- (void)didReceiveChatMessage:(NSArray *)chats;
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 4.7.1
|
|
|
|
|
|
发布日期:2022.12.26
|
... | ... | |