I am creating an application in Cordoba where the first page of the application contains a video tag set for auto play. I do not get 404 errors when downloading a file ... The file simply will not play. The video is just black with a time of 0:00, which does not change.
Itβs strange that I get two network requests in the tools for the remote Chrome video clip for the video file: the first shows status (success), and the second has status (canceled). I tried using two different URLs for the file:
file: ///android_asset/www/video/nameofmyvideo.mp4 with the video file actually located in /www/video/nameofmyvideo.mp4.
and
android.resource: // mypackagename / raw / nameofmyvideo with the video file is actually in / www / res / raw / nameofmyvideo and / platform / android / res / raw / nameofmyvideo
I use the latest Cordova (3.4.1-0.1.0) and test on incendiary fire CM-11 (4.4.2).
Here is the markup that I use:
<video width="400px" height="300px" autoplay controls> <source src="file:///android_asset/www/video/video-test.mp4" type="video/mp4"> </video>
OR
<video width="400px" height="300px" autoplay controls> <source src="android.resource://my.package.name/raw/videotest" type="video/mp4"> </video>
Is this a problem for Android? The app works just as it does on iOS. I also tried using webm, without success.
edit:
It also seems that the problem of dual network downloads (one success, one canceled) occurs regardless of whether the file is actually downloading. I uploaded the same mp4 file via http hosted on my website and the video played normally (but still showed both requests).
source share