How do I make the html5 video tag to work on Android 4.x

I have a web app (HTML5 + js + mp4 animations) That I want to encapsulate within a Android webview. Problem is that the mp4 animations (simple html5 video tag with local mp4 files) are not running on android 4.x devices. What are my alternatives? Animated gifs? Flash animations?

The code is very straight forward:

Html:

<video id="myvid"></video>

JS:

var video = window.gedElementById('myvid');
video.src = "../movies/myvid.mp4";
video.play(); // Doesn't work on Andoroid 4.x

I have worked on this problem for many weeks now and I have given up. So I’m looking for alternatives. Any suggestions?


Source: html5

Leave a Reply