|
|
|
|
|
## 1.SDK集成
|
|
|
|
|
|
### 1.1 方法1:Cocoapods导入
|
... | ... | @@ -139,6 +138,8 @@ include|SDK开放的头文件及静态库,同demo中的SDK文件夹 |
|
|
|
|
|
>>>> ProjectionScreen(视频投屏)
|
|
|
|
|
|
>>>> Barrage(视频弹幕)
|
|
|
|
|
|
>>>> Others (其余使用到的类)
|
|
|
|
|
|
>>>> ... (额外的其他功能,这里就不一一列举了)
|
... | ... | @@ -147,12 +148,10 @@ include|SDK开放的头文件及静态库,同demo中的SDK文件夹 |
|
|
|
|
|
>>> Tools (Demo中使用的一些通用方法)
|
|
|
|
|
|
>>> Reachability (网络状态检测)
|
|
|
>>> OCBarrage (视频弹幕控件)
|
|
|
|
|
|
>>> SDWebImage
|
|
|
|
|
|
>>> SDCycleScrollView
|
|
|
|
|
|
>>> MJExtension
|
|
|
|
|
|
>>> Masonry
|
... | ... | @@ -194,6 +193,7 @@ include|SDK开放的头文件及静态库,同demo中的SDK文件夹 |
|
|
playInfo.timeoutSeconds = 30;
|
|
|
playInfo.mediatype = @"1";
|
|
|
playInfo.verificationCode = @"授权验证码,没有此功能不需要设置";
|
|
|
playInfo.roleId = @"客户端用户id,选填";
|
|
|
playInfo.finishBlock = ^(DWVodVideoModel *vodVideo) {
|
|
|
//成功回调
|
|
|
NSLog(@"%@",vodVideo);
|
... | ... | @@ -232,17 +232,7 @@ include|SDK开放的头文件及静态库,同demo中的SDK文件夹 |
|
|
|
|
|
### 3.2 下载功能
|
|
|
|
|
|
#### 3.2.1 在合适的位置调用configureBackroundSession方法
|
|
|
|
|
|
```
|
|
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
|
{
|
|
|
//后台下载设置
|
|
|
[[DWDownloadSessionManager manager] configureBackroundSession];
|
|
|
}
|
|
|
```
|
|
|
|
|
|
#### 3.2.2 通过CC账号UserID、APIKey、VideoId,来获取DWVodVideoModel对象
|
|
|
#### 3.2.1 通过CC账号UserID、APIKey、VideoId,来获取DWVodVideoModel对象
|
|
|
|
|
|
```
|
|
|
//获取方式与视频获取方式一样,只不过hlsSupport参数要传@"0"
|
... | ... | @@ -251,7 +241,7 @@ include|SDK开放的头文件及静态库,同demo中的SDK文件夹 |
|
|
|
|
|
```
|
|
|
|
|
|
#### 3.2.3 获取DWDownloadSessionManager单例对象,创建DWDownloadModel对象,通过调用startWithDownloadModel:方法即可开始下载
|
|
|
#### 3.2.2 获取DWDownloadSessionManager单例对象,创建DWDownloadModel对象,通过调用startWithDownloadModel:方法即可开始下载
|
|
|
|
|
|
```
|
|
|
//等待DWPlayInfo获取到DWVodVideoModel对象
|
... | ... | |