简体   繁体   中英

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?

Couldn't you convert it to a file type which is playable? Or you could host it online and pull it in from the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM