Open ghost opened 7 years ago
const fileTransfer = new BackgroundTransfer.BackgroundDownloader(); console.log(item.fileUrl+"===="+targetPath) File.createFile(targetPath,filename,false).then(entry=>{
let download = fileTransfer.createDownload(item.fileUrl, entry); download.startAsync().then((entry) => { self.addToDownloaded(item); resolve(item); item['filePath'] = targetPath; // VideoUtils.playVideo(targetPath); // self.events.publish('download:done'); }, (error) => { reject(error); // self.events.publish('download:error'); }, (progressEvent) => { this.ngZone.run(() => { if (!!progressEvent) { onProgress(progressEvent); } }); });
const fileTransfer = new BackgroundTransfer.BackgroundDownloader(); console.log(item.fileUrl+"===="+targetPath) File.createFile(targetPath,filename,false).then(entry=>{