[M2] 视频下载网络中断问题处理
This commit is contained in:
@@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user