[M2] 视频下载网络中断问题处理

This commit is contained in:
wangmingjun
2023-03-09 21:58:49 +08:00
parent 4513f98220
commit be622a01ac

View File

@@ -207,10 +207,15 @@ class AdvanceVideoView @JvmOverloads constructor(
} }
override fun onFinished(url: String?, threadBean: ThreadBean?) { override fun onFinished(url: String?, threadBean: ThreadBean?) {
Logger.d(ImageAndVideoRotation.TAG, "download-onFinished") Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = $url")
//下载完成 if (url.equals(fileNetPath)){ //发现下载工具在断网又连网后,任务又都排队下载,跳转播放出现问题
ThreadUtils.runOnUiThread { //下载完成
startPlay() ThreadUtils.runOnUiThread {
startPlay()
}
}else{//再次去下载当前的
startDownLoadVideo()
Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = not current video")
} }
} }