You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add a button in my app that can download the video just filmed. I use that code, but something is missing as it stops (it works perfectly for the little one or 2 seconds videos.
@IBAction func onSavingBtnClicked(_ sender: Any) {
let path = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
let originPath = path.appending("/\(lastFileName)")
var test:Int = 0
let alert = UIAlertView();
alert.message = "Saving: \(lastFileName)";
alert.addButton(withTitle: "Ok")
alert.show()
self.mCamera.downloadFile(fileName: lastFileName, destFilePath: originPath, success:
{
downloadTask in
self.testLbl.text = String(describing: downloadTask.downloadedBytes)
} , fail: {
error in
let alert = UIAlertView();
alert.message = error as? String;
alert.addButton(withTitle: "Ko")
alert.show()
});
}
}
Should I have to use URLSession ? But I don't really know how to use it.
=> I don't know how to use that:
I would like to add a button in my app that can download the video just filmed. I use that code, but something is missing as it stops (it works perfectly for the little one or 2 seconds videos.
Should I have to use URLSession ? But I don't really know how to use it.
=> I don't know how to use that:
Thanks in advance.
The text was updated successfully, but these errors were encountered: