Android HTML5 video - works when clicking play, but not video.play()
android, html, html5-video
Solution
It wouldn't work for the same reason browsers block calls to `window.open()`, because allowing it would allow web developers to subvert user preference not to auto play media (or open popup windows).
The difference between clicking play and using this method is exactly what you've said: the click. These sort of calls are allowed in click events, but not generally.
Problem
I understand that html5 video on Android cannot autoplay. As it stands my video works on the device only when the user clicks on the play button. ``` <video width="640px" height="360px" src="media/video/Moments_of_Everyday_Life.mp4" controls id="video"></video> <script type="text/javascript"> $(function(){ var video = document.getElementById('video'); video.play(); }); </script> ``` It works on my desktop though. Why would this not work? And what is the difference between clicking play and using `.play()` ?