I am trying to get video playback work with Meteor 184.108.40.206 and Cordova on Android and IOS devices. I’m currently trying to stream my file with simple HTML5 video tag. My video file is an .mp4 in h264 codec.
We used meteor package file : ostrio:files (VeliovGroup/Meteor-Files) verison 1.9.11. Notice that we generate custom URL instead of use file.link(), that can be used with --mobile-server in Cordova (see in the #597 issue).
Example of custom URL that we use for stream file in classic browser.
The stream is working perfectly on the web app, but once I go to the mobile app the playback could not launch.
First of all when i start my mobile application i get this error multiples times (but the application work perfectly) :
Failed to load http://192.168.17.3:3000/_timesync: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:12768' is therefore not allowed access.
And when i’m trying to stream my file i get two errors :
Refused to load the image 'android-webview-video-poster:default_video_poster/-2094984208415350593' because it violates the following Content Security Policy directive: "default-src * gap: data: blob: 'unsafe-inline' 'unsafe-eval' ws: wss:". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.
Related to SCP meteor/meteor#8965 i think but even after a long search that I couldn’t fix this bug.
And the last error related to my link stream :
GET https://domain.com/cdn/storage/Filesupload/2Nc2YatHFPK5bFpcc/original/2Nc2YatHFPK5bFpcc.mp4 net::ERR_CONNECTION_REFUSED
But when I click on the link to open it in the browser the link works perfectly. The HTML video player launch perfectly in mobile too but the video can’t be load.
Have you ever experienced this kind of problems before ? and is there any known issue ?
Permission on android maybe ? I don’t really know where to look if this is Cordova , ostrio:files, Content Security Policy or Meteor related ?