|
|
|
# 云直播iOS推流SDK更新说明
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### v2.7.0
|
|
|
|
|
|
|
|
发布日期:2023.12.06
|
|
|
|
|
|
|
|
1.支持推流端展示打赏消息及特效
|
|
|
|
2.优化主动退出房间登录逻辑
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**PS: 打赏功能接入具体见《iOS 推流打赏功能接入文档》**
|
|
|
|
|
|
|
|
##### API变更:
|
|
|
|
|
|
|
|
###### 房间互动配置(代理方法)
|
|
|
|
|
|
|
|
| 方法 | 注释 | 所在类文件 |
|
|
|
|
| ----------------------------- | ------------ | ---------------------- |
|
|
|
|
| (void)onInteractionConfigure: | 互动功能配置 | HDLiveKit/CCPushUtil.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/// 房间互动配置
|
|
|
|
/// @param model 配置项
|
|
|
|
- (void)onInteractionConfigure:(HDSInteractionConfigureModel *)model;
|
|
|
|
```
|
|
|
|
|
|
|
|
HDSInteractionConfigureModel
|
|
|
|
|
|
|
|
| 参数 | 类型 | 注释 | 所在类文件 |
|
|
|
|
| ----------------- | ----------------------- | -------------------------- | -------------------------- |
|
|
|
|
| isLiveStoreSwitch | BOOL | 直播带货开关 0:关闭 1:开启 | HDLiveKit/PushParameters.h |
|
|
|
|
| giftModel | HDSInteractionGiftModel | 打赏 | HDLiveKit/PushParameters.h |
|
|
|
|
|
|
|
|
HDSInteractionGiftModel
|
|
|
|
|
|
|
|
| 参数 | 类型 | 注释 | 所在类文件 |
|
|
|
|
| ------------------ | ------- | ----------------------------------------------- | -------------------------- |
|
|
|
|
| giftFunctionConfig | Integer | 打赏礼物功能配置 0:关闭 1:直播间配置 2:全局配置 | HDLiveKit/PushParameters.h |
|
|
|
|
| specialEffects | Integer | 打赏礼物特效配置 0:关闭 1:左侧特效 2:全局特效 | HDLiveKit/PushParameters.h |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###### 主动退出房间
|
|
|
|
|
|
|
|
| 方法 | 注释 | 所在类文件 |
|
|
|
|
| ------------ | ---------------------------- | ---------------------- |
|
|
|
|
| (void)logout | 退出登录(退出房间必须调用) | HDLiveKit/CCPushUtil.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
- (void)logout;
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### v2.6.2
|
|
|
|
|
|
|
|
发布日期:2023.08.25
|
|
|
|
|
|
|
|
1.修复推流端主持人模式闪退的问题
|
|
|
|
2.修复推流端主持人模式全球节点闪退的问题
|
|
|
|
3.优化推流端登陆时长
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### v2.6.0
|
|
|
|
|
|
|
|
发布日期:2023.04.19
|
|
|
|
|
|
|
|
1.支持推流相关参数云控;
|
|
|
|
|
|
|
|
2.支持强制结束直播操作;
|
|
|
|
|
|
|
|
#### v2.5.0
|
|
|
|
|
|
|
|
发布日期:2022.12.16
|
|
|
|
|
|
|
|
1.支持URL唤起并自动登录
|
|
|
|
|
|
|
|
2.修复其他已知问题
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### v2.5.0
|
|
|
|
|
|
|
|
发布日期:2022.12.16
|
|
|
|
|
|
|
|
1.支持URL唤起并自动登录
|
|
|
|
|
|
|
|
2.修复其他已知问题
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### v2.4.0
|
|
|
|
|
|
|
|
发布日期:2022.09.27
|
|
|
|
|
|
|
|
1.新增直播带货
|
|
|
|
|
|
|
|
2.适配iOS16
|
|
|
|
|
|
|
|
3.修复部分已知问题
|
|
|
|
|
|
|
|
新增API
|
|
|
|
|
|
|
|
4.1 房间互动功能配置信息(代理方法)
|
|
|
|
|
|
|
|
| 方法 | 注释 | 所在类文件 |
|
|
|
|
| ----------------------------- | ------------ | ---------------------- |
|
|
|
|
| (void)onInteractionConfigure: | 互动功能配置 | HDLiveKit/CCPushUtil.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/// 房间互动配置
|
|
|
|
/// @param model 配置项
|
|
|
|
- (void)onInteractionConfigure:(HDSInteractionConfigureModel *)model;
|
|
|
|
```
|
|
|
|
|
|
|
|
HDSInteractionConfigureModel
|
|
|
|
|
|
|
|
| 参数 | 类型 | 注释 | 所在类文件 |
|
|
|
|
| ----------------- | ---- | -------------------------- | -------------------------- |
|
|
|
|
| isLiveStoreSwitch | BOOL | 直播带货开关 0:关闭 1:开启 | HDLiveKit/PushParameters.h |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4.2 获取互动组件Token(主动方法)
|
|
|
|
|
|
|
|
| 方法 | 注释 | 所在类文件 |
|
|
|
|
| --------------------------------- | ------------------ | ---------------------- |
|
|
|
|
| (void)getInteractionToken: token: | 获取互动组件 token | HDLiveKit/CCPushUtil.h |
|
|
|
|
|
|
|
|
示例代码
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/// 获取互动token
|
|
|
|
/// @param closure 操作回调
|
|
|
|
/// @param token interactionTokenBlock token回调 "completeHandler回调中 result == YES ,返回token ,result == NO时返回@""(空字符串) "
|
|
|
|
- (void)getInteractionToken:(completeHandler)closure token:(interactionTokenBlock)token;
|
|
|
|
```
|
|
|
|
|
|
|
|
新增依赖库
|
|
|
|
|
|
|
|
HDBaseUtils.framework
|
|
|
|
|
|
|
|
CocoaLumberjack.framework
|
|
|
|
|
|
|
|
手动导入
|
|
|
|
|
|
|
|
```objc
|
|
|
|
1.解压zip包后,找到SDK文件夹下,将HDLiveKit文件夹下的framework 拖拽到项目中
|
|
|
|
2.签名方式为 Embed/Sign
|
|
|
|
```
|
|
|
|
|
|
|
|
cocoapods导入
|
|
|
|
|
|
|
|
```objc
|
|
|
|
在podfile文件中导入下面代码
|
|
|
|
pod 'CCLivePushSDK' 即可
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**PS:2.4.0 版本推流直播带货功能详情见《iOS推流直播带货功能接入文档》**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### v2.3.3
|
|
|
|
|
|
|
|
发布日期:2022.09.08
|
|
|
|
|
|
|
|
1.增加用户使用隐私协议
|
|
|
|
|
|
|
|
2.优化已知问题
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### V2.3.2
|
|
|
|
|
|
|
|
发布日期:2022.04.15
|
|
|
|
|
|
|
|
1.优化部分设备推流,观看端闪烁的问题
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### V2.3.1
|
|
|
|
|
|
|
|
发布日期:2021.11.15
|
|
|
|
|
|
|
|
1.优化部分节点推流闪退问题
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### V2.3.0
|
|
|
|
|
|
|
|
发布日期:2020.07.09
|
|
|
|
|
|
|
|
1.新增网页主持人模式
|
|
|
|
|
|
|
|
2.新增讲师重复登录踢出
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### V2.2.0
|
|
|
|
|
|
|
|
发布日期:2020.05.27
|
|
|
|
|
|
|
|
1.房间信息:
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/**
|
|
|
|
* @brief dict 房间信息
|
|
|
|
* manuallyRecordMode //是否开启手动录制 0 未开启 1 开启
|
|
|
|
* module 房间模板类型
|
|
|
|
*/
|
|
|
|
-(void)roomInfo:(NSDictionary *)dict;
|
|
|
|
```
|
|
|
|
|
|
|
|
2.手动录制:
|
|
|
|
|
|
|
|
```objc
|
|
|
|
/*
|
|
|
|
@brief 开始录制
|
|
|
|
返回值
|
|
|
|
success 成功/失败;
|
|
|
|
dict = {
|
|
|
|
result = OK
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
- (void)startRecordWithCompletion:(void(^)(BOOL success, NSDictionary *dict))completion;
|
|
|
|
/*
|
|
|
|
@brief 暂停录制
|
|
|
|
*/
|
|
|
|
- (void)pauseRecordWithCompletion:(void(^)(BOOL success, NSDictionary *dict))completion;
|
|
|
|
/*
|
|
|
|
@brief 继续录制
|
|
|
|
*/
|
|
|
|
- (void)resumeRecordWithCompletion:(void(^)(BOOL success, NSDictionary *dict))completion;
|
|
|
|
/*
|
|
|
|
@brief 停止录制,停止录制后想要继续录制需要调用开始录制方法
|
|
|
|
*/
|
|
|
|
- (void)stopRecordWithCompletion:(void(^)(BOOL success, NSDictionary *dict))completion;
|
|
|
|
```
|
|
|
|
|
|
|
|
3.优化推流预览流程,设置推流预览视图后可直接推流;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 创盛视联数码科技(北京)有限公司 |