this is my vimeo video url 我正在从url以上下载视频,并且始终将其保存为0字节到我的手机内存中,我需要在手机内存中下载完整的视频
$cordovaFile.checkFile(cordova.file.externalApplicationStorageDirectory + 'foldername/', filename)
.then(function (success) {
console.log(success)
//alert(JSON.stringify(success));
}, function (error) {
console.log(JSON.stringify(error))
// alert(JSON.stringify(error));
$cordovaFileTransfer.download(url, targetPath, {}, true).then(function (result) {
console.log(JSON.stringify(result))
}, function (progress) {
$scope.progresss1 = 0;
$scope.progresss1 = (progress.loaded / progress.total) * 100;
$scope.progresss1 = Math.floor($scope.progresss) + "%";
if (((progress.loaded / progress.total) * 100) == 100) {
alert('download complete');
console.log('Downloading complete intro video');
}
console.log(JSON.stringify(progress));
});
})