I'm creating an app to watch a video on 360. I'm using this plugin: link
This plugin uses Google VR View as the base. In this case it has a function called playVideo()
which receives two parameters: filename and playback options.
When my video is in the www
folder, that is, when I compile and generate the APK, the video works normally.
But when you have a video that is in the phone memory, it is not working. I'm using the Cordova + Ionic (cordova-plugin-file) plugin to get the file that is in the Download folder.
I'm using the checkFile()
function to check if the file exists. If yes, execute the playVideo()
function with the file path. But it does not work. The error you give is this: error while loading video .
It seems that this path does not work, but the checkFile function works. I've purposely made a mistake and the function really works.
Is it security policy? I do not know what that can be.
let path = this.file.externalRootDirectory + 'Download';
let video = 'Video.mp4';
this.file.checkFile(path, video).then((data) => {
window['VrView'].playVideo(path + '/' + video, options);
}).catch((err) => {
console.log('Erro', err);
});