I'm 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 doesn't play. It looks like it's a buffering issue, as when I hover on the video (to show controls) the video is always 2 seconds in but then stops and doesn't continue.
Note: I just visited the site again and autoplay 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?
Chrome does not allow autoplay if the video is not muted. So to autoplay video you need to set both autoplay and muted attribute.
The HTML autoplay Attribute is used to specify that the audio/video should automatically start playing when web page is loaded. It is a Boolean attribute. Uses It can be used with <audio> and <video> element. Example 1: Here the autoplay attribute is used with the <video> tag.
If your browser error "HTML5 video file not found", it means that your browser is not up to date or website pages does not have a suitable video codec. It would help if you communicated with the developer to solve the issue and install all the required codecs.
<video>: The Video Embed element. The <video> HTML element embeds a media player which supports video playback into the document.
Try autoplay="autoplay"
instead of the "true"
value. That's the documented way to enable autoplay. That sounds weirdly redundant, I know.
Chrome does not allow autoplay if the video is not muted. Try using this:
<video width="440px" loop="true" autoplay="autoplay" controls muted> <source src="http://www.tuscorlloyds.com/CorporateVideo.mp4" type="video/mp4" /> <source src="http://www.tuscorlloyds.com/CorporateVideo.ogv" type="video/ogv" /> <source src="http://www.tuscorlloyds.com/CorporateVideo.webm" type="video/webm" /> </video>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With