... | @@ -529,6 +529,96 @@ Demo包含播放、上传和下载三个功能模块: |
... | @@ -529,6 +529,96 @@ Demo包含播放、上传和下载三个功能模块: |
|
2. AccountInfoActivity.java里面增加了默认播放、下载的配置
|
|
2. AccountInfoActivity.java里面增加了默认播放、下载的配置
|
|
3. 下载部分数据表更新,老用户请卸载老demo在安装
|
|
3. 下载部分数据表更新,老用户请卸载老demo在安装
|
|
|
|
|
|
|
|
### 4.7.4 使用Demo的视频压缩功能
|
|
|
|
|
|
|
|
Demo提供了视频压缩功能,可以选择高质量压缩、中质量压缩、低质量压缩,压缩质量越高,压缩出来的文件就相对较大
|
|
|
|
高质量压缩:
|
|
|
|
```
|
|
|
|
* @param filePath 源文件路径
|
|
|
|
* @param compressOutPut 输出文件路径
|
|
|
|
* @param VideoCompress.CompressListener 压缩过程监听
|
|
|
|
VideoCompress.compressVideoHigh(filePath, compressOutPut, new VideoCompress.CompressListener() {
|
|
|
|
@Override
|
|
|
|
public void onStart() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSuccess() {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFail() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onProgress(float percent) {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
```
|
|
|
|
|
|
|
|
中质量压缩:
|
|
|
|
```
|
|
|
|
* @param filePath 源文件路径
|
|
|
|
* @param compressOutPut 输出文件路径
|
|
|
|
* @param VideoCompress.CompressListener 压缩过程监听
|
|
|
|
VideoCompress.compressVideoMedium(filePath, compressOutPut, new VideoCompress.CompressListener() {
|
|
|
|
@Override
|
|
|
|
public void onStart() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSuccess() {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFail() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onProgress(float percent) {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
```
|
|
|
|
|
|
|
|
低质量压缩:
|
|
|
|
```
|
|
|
|
* @param filePath 源文件路径
|
|
|
|
* @param compressOutPut 输出文件路径
|
|
|
|
* @param VideoCompress.CompressListener 压缩过程监听
|
|
|
|
VideoCompress.compressVideoLow(filePath, compressOutPut, new VideoCompress.CompressListener() {
|
|
|
|
@Override
|
|
|
|
public void onStart() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSuccess() {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFail() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onProgress(float percent) {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
```
|
|
|
|
|
|
## 4.8 倍速功能
|
|
## 4.8 倍速功能
|
|
|
|
|
|
倍速功能使用第三方库IjkMediaPlayer v0.8.4来实现。倍速播放功能需要使用DWIjkMediaPlayer类,该类继承自第三方库IjkMediaPlayer的IjkMediaPlayer类,该类的使用方法和DWMediaPlayer一样。
|
|
倍速功能使用第三方库IjkMediaPlayer v0.8.4来实现。倍速播放功能需要使用DWIjkMediaPlayer类,该类继承自第三方库IjkMediaPlayer的IjkMediaPlayer类,该类的使用方法和DWMediaPlayer一样。
|
... | @@ -604,100 +694,3 @@ https://github.com/CCVideo/VOD_Android_SDK/tree/master/doc/api |
... | @@ -604,100 +694,3 @@ https://github.com/CCVideo/VOD_Android_SDK/tree/master/doc/api |
|
```
|
|
```
|
|
在非加密的情况下,加上player.setHttpsPlay(false);
|
|
在非加密的情况下,加上player.setHttpsPlay(false);
|
|
``` |
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|