下载单个视频,进度一直是0
moo611 opened this issue · 5 comments
moo611 commented
在success和fail也没收到回调
singleDownloadManager.progress{manager in
print("下载中, 进度:\(manager.progress.fractionCompleted)")
ProgressHUD.showProgress(manager.progress.fractionCompleted,interaction: true)
}.success{manager in
print("下载完成")
let fileName = manager.tasks[0].fileName
print("file name is:\(fileName)")
self.isDownloading = false
ProgressHUD.dismiss()
manager.totalRemove()
self.view.makeToast(NSLocalizedString("save_success", comment: ""))
}.failure{manager in
print("下载失败")
self.isDownloading = false
manager.totalRemove()
ProgressHUD.dismiss()
self.view.makeToast(NSLocalizedString("download_fail", comment: ""))
}
moo611 commented
视频url(超过1天会过期,但是我测试的时候是可以在浏览器访问的)
https://scontent.cdninstagram.com/v/t50.2886-16/322926394_533176092097466_4046620750502107347_n.mp4?_nc_ht=scontent.cdninstagram.com&_nc_cat=102&_nc_ohc=8Q0J8uikMRMAX_zdjGR&edm=AJBgZrYBAAAA&ccb=7-5&oh=00_AfDRZPw1Yz2NnwzN_TICr0XCf6n0tej9-c0gmWP4MxD1_w&oe=63C19DE1&_nc_sid=78c662
Danie1s commented
我用 demo 测试是可以下载,文件可以播放的
moo611 commented
请问如果链接超时了,会走failure吗?
moo611 commented
我现在偶尔会遇到这种卡着的情况,想看看没有什么好的解决方案。