HTML5 Video Autoplay not working correctly

NickMcB picture NickMcB · Jun 6, 2013 · Viewed 107.3k times · Source

Im using this code:

<video width="440px" loop="true" autoplay="true" controls>
<source src="http://www.example.com/CorporateVideo.mp4" type="video/mp4" />
<source src="http://www.example.com/CorporateVideo.ogv" type="video/ogv" />
<source src="http://www.example.com/CorporateVideo.webm" type="video/webm" />
</video>

I want the video to autoplay but when the page loads the video doesnt play, it looks like its a buffering issue as when I hover on the video (to show controls) the video is always 2seconds in but then stops and doesnt continue.

Note: I just visited the site again and autopplay seemed to work but when I try again the same issue is happening, is this a buffering issue? Anything I can do to stop this?

Many Thanks nick

Answer

Multimedia Mike picture Multimedia Mike · Jun 7, 2013

Try autoplay="autoplay" instead of the "true" value. That's the documented way to enable autoplay. That sounds weirdly redundant, I know.