I have a requirement where I need to download videos from my app and store them within the app so that the videos are not accessible from the folders, but can be viewed only from the App. the way youtube offline support work same functionality i want it in my app
this.platform.ready().then(() => {
// make sure this is on a device, not an emulation (e.g. chrome tools device mode)
if(!this.platform.is('cordova')) {
return false;
}
if (this.platform.is('ios')) {
this.storageDirectory = cordova.file.documentsDirectory;
this.checkFile();
}
else if(this.platform.is('android')) {
file.createDir(file.externalDataDirectory, 'media', true).then((result)=>{
console.log("Directory created"+result);
});
this.storageDirectory = cordova.file.externalDataDirectory+ 'media/';
console.log(this.storageDirectory);
}
else {
// exit otherwise, but you could add further types here e.g. Windows
return false;
}
});
}
Hi,
The files stored locally in phone storage right it will increase the phone memories right? How to avoid this is it possible to store videos locally when it’s play in offline
It almost sounds like you’re asking “how do I store things on a device for offline use without using storage space on the device?”, but you’re not asking that, right?
You are correct. do you have any solution for this question
"how do I store things on a device for offline use without using storage space on the device?”.
I had actually hoped that phrasing it the way that I did would bring the inherent impossibility of the idea into clearer focus, but I guess that was not a very successful way of going about that task.