html5 - Local video files won't play in Cordova Android App -


I am creating an app in Cordoba where the first page of the app has a video tag set on autoplay. I did not find any 404 errors in loading the file ... The file will not play yet The video is black with a duration of 0:00 only, which does not make any changes.

The strange thing is that I get two network requests in the Chrome Remote Dev tool for the video file: First one shows the (success) status, and the other has a (cancellation) status. I have tried to use two different URLs for the file:

File: ///android_asset/www/video/nameofmyvideo.mp4 In fact with the video file /www/video/nameofmyvideo.mp4 . and

android.resource: // mypackagename / raw / nameofmyvideo

I am running the latest Cordova (3.4.1-0.1.0) and testing the fire running CM-11 (4.4.2).

Here's the markup I'm using:

  & lt; Video width = "400px" height = "300px" autoplay control & gt; & Lt; source src = "file: ///android_asset/www/video/video-test.mp4" type = "video / mp34" & gt; & Lt; / Video & gt;   

OR

  & lt; Width of video = "400px" height = "300px" autoplay control & gt; & Lt; source src = "android.resource: //my.package.name/raw/videotest" type = "video / mp34" & gt; & Lt; / Video & gt;   

Is this an Android pathing problem? The app runs fine in iOS I have not even tried to use the webmeter.

Edit:

It also seems that Double Network Load Issues (a breakthrough, one cancellation) whether the file can actually be loaded on http hosted on my website. Loaded the same MP4 file and the video played fine (but still both requests were shown).

On Android, it is not possible to read videos from within assets , you It must be given to the app, SDCD or the location far away. This is because APK is basically compressed to the jar and files in assets need to be uncompressed at work, and Android can not uncompress video files from the APK.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -