Autoplay mp4 video with html5
I'm creating a web 开发者_Python百科page using HTML5 in order to have a mp4 video on it, I already accomplished this but, I trying to add some functionalities like autoplay, autobuffer and loop using this code
<video id="video" width="320" height="240" src="http://.../TCLAST.mp4" controls autobuffer autoplay loop>
But nothing so far, one more thing I want to display this page on the Motorola XOOM. I have used different browsers like dolphin, skyfire, firefox and the default browser.
You can try videojs ( http://videojs.com/ ) and play the video on DOMReady. Using the video JS API. This will also give you the benefit of being iDevice compatable.
The XOOM in its current form is very picky about video. Have you verified that the video you want to play will play in the native player?
For more information, look here:
http://forum.xda-developers.com/showthread.php?t=1026570&highlight=video
http://forum.xda-developers.com/showthread.php?t=1021461&highlight=video
Here the Demo
http://jsfiddle.net/dineshk/fvnr0zex/2/
This Will work when the video tag append using Javascript.
Here the Javascript code
var newHtml = '<video width="100%" height="30%" autoplay controls id="myVideos" src="https://dev.ocutagsnap.com:8080/PearsonVideos/videos/tumb10.mp4" ></video>';
$("#newone").append(newHtml);
精彩评论