[M2] 视频下载网络中断问题处理
This commit is contained in:
@@ -207,10 +207,15 @@ class AdvanceVideoView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onFinished(url: String?, threadBean: ThreadBean?) {
|
||||
Logger.d(ImageAndVideoRotation.TAG, "download-onFinished")
|
||||
//下载完成
|
||||
ThreadUtils.runOnUiThread {
|
||||
startPlay()
|
||||
Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = $url")
|
||||
if (url.equals(fileNetPath)){ //发现下载工具在断网又连网后,任务又都排队下载,跳转播放出现问题
|
||||
//下载完成
|
||||
ThreadUtils.runOnUiThread {
|
||||
startPlay()
|
||||
}
|
||||
}else{//再次去下载当前的
|
||||
startDownLoadVideo()
|
||||
Logger.d(ImageAndVideoRotation.TAG, "download-onFinished = not current video")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user