I'm trying to play automatically a video when the user open the page on browser. On my laptop autoplay works on all browsers, but on android it doesn´t work on Google Chrome and in Iphone it doesn't works in safari. I already did a search and google chrome in android doesn't support html5 video tag so i used some javascript but it doesn't work too. Why? What should i do? Here's my code
<video id="video" autoplay autobuffer controls="controls" allowFullScreen >
<source src="video.mp4" type="video/mp4">
<source src="video.webm" type="video/webm" webView.mediaPlaybackRequiresUserAction = NO;>
<source src="video.theora.ogv" type="video/ogg">
<source src="video.flv" type="video/flv">
<source src="video.vob" type="video/vob">
<source src="video.mov" type="video/mov">
</video>
<script type="text/javascript">
var video = document.getElementById('video'); video.addEventListener('video',function(){
video.play();
});
video.addEventListener("domready", function(){ video.play();
});
video.addEventListener("ended", function(){
window.location = "http://www.google.com"
});
</script>