I'm recording/selecting video with media-capture plugin, convert it to mp4 with video-editor plugin and after the user confirms the selection I copy/move this file to app specific media dir (something like /storage/emulated/0/APPNAME/Video/
).
Everything works fine, except that if the user tries to open the video file immediately, the native video player will open but there'll be a message like "Could not play video" (on android) and the console.log
shows the error "File not found".
This happens on both iOS and Android. I use this plugin to open video files in native players.
If I exit the app and reopen it, the issue dissapears. So the problem is, I think, that the system does not know about the existance of that new copied/moved file. Is there a way to refresh the filesystem?
I have checkd the file URI that I pass to the openfile plugin and it's the same when it works & when it doesn't.
I use HTML5 FileSystem to copy/move files.
I use promisses, I wait until files are copied/moved, so it's not this the issue.