Put file into dataDirectory (build-in)?


#1

Hi all,

I’m using the Cordova Video Editor plugin to transcode a video.

When I download the video first into the dataDirectory (cf. Cordova File plugin), and then use the URI as path for transcoding, it works perfectly.

But I want this video to be “baked-in”. So I’ve put my video in de www folder, and used this.file.applicationDirectory + 'www/video.mp4'; (which points to file:///android_asset/www/video.mp4). But that doesn’t work. I get an error: java.io.FileNotFoundException.

The video exists because I can play it using the exact same path with the Cordova Video Player plugin.

Is there a way to put my video directly in the dataDirectory, instead of the applicationDirectory?