... | ... | @@ -128,3 +128,64 @@ implementation 'com.bokecc:CompressVideoLib:1.0.0' |
|
|
```
|
|
|
|
|
|
如果不希望上传日志,不进行设置clientId即可
|
|
|
|
|
|
## 8.7 安全校验升级
|
|
|
|
|
|
自3.20.0版本起,为了进一步提升安全级别,可采用SID安全校验方案。
|
|
|
|
|
|
[SID安全校验流程详解](https://doc.bokecc.com/vod/developer/base/sdksid/sdksid.html)
|
|
|
|
|
|
该方案的改动点如下:
|
|
|
|
|
|
### sdk初始化(InitializeManager)
|
|
|
|
|
|
```java
|
|
|
public void initialize()
|
|
|
或者
|
|
|
public void initialize(boolean isLog)
|
|
|
```
|
|
|
|
|
|
改为:
|
|
|
|
|
|
```java
|
|
|
public void initialize(boolean isLog, VerificationMode mode)
|
|
|
```
|
|
|
|
|
|
注意:如果设置的安全校验方式为SID,下面需要配套进行执行,如果设置的安全校验方式为ORDINARY,参照原先的api方式调用即可,无需改动
|
|
|
|
|
|
### 在线视频播放
|
|
|
|
|
|
```java
|
|
|
public void setVideoPlayInfo(String videoId, String userId, String apiKey, String verificationCode, Context context)
|
|
|
```
|
|
|
|
|
|
改为:
|
|
|
|
|
|
```java
|
|
|
public void setVideoPlayInfo(String videoId, String userId, String verificationCode, Context context,SdkSidProvider sdkSidProvider)
|
|
|
```
|
|
|
|
|
|
### 视频下载(VodDownloadManager)
|
|
|
|
|
|
```java
|
|
|
public void init(Context context, String userId, String apiKey, String downloadPath)
|
|
|
```
|
|
|
|
|
|
改为:
|
|
|
|
|
|
```java
|
|
|
public void init(Context context, String userId, String downloadPath, SdkSidProvider sdkSidProvider)
|
|
|
```
|
|
|
|
|
|
### 视频上传(Uploader)
|
|
|
|
|
|
```java
|
|
|
Uploader uploader = new Uploader(VideoInfo videoInfo, String apiKey)
|
|
|
```
|
|
|
|
|
|
改为:
|
|
|
|
|
|
```java
|
|
|
Uploader uploader = new Uploader(VideoInfo videoInfo, SdkSidProvider sdkSidProvider)
|
|
|
```
|
|
|
|