I want a video to play automatically on my website, for now I have the following code:
<video width="440px" loop="true" autoplay="autoplay" controls>
<source src="src="http:tuvideo.com/mivideo.mp4"" type="video/mp4">
</video>
I hope you can collaborate. It doesn't matter that we have to insert Javascript. Greetings.
The correct format to play a video is as follows:
I must confess that it only works in Chrome if you add the " muted " statement.
I tell them that a good way to engage users is to use muted autoplay and that's how it worked for me. I hope serve something. Greetings.
Official source: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#mei
As previously mentioned by @Francisco Garrido, you must add the tag
autoplay
, try removing the attribute if you like from the following example:Maybe you are putting the attribute in a wrong place, check it. I hope it helps you. Greetings.
In Chrome
autoplay
it works only if you also use the attributemuted