This is a quick tip for anyone that wants to place a video onto their website and make it play automatically.
If you check out the documentation, you will soon see that there is an attribute called
and you’d think that you could just use that and it would always work. Want to see an example?
The thing is though, it will not play in Chrome and the problem isn’t obvious.
The issue is that Chrome won’t autoplay those videos unless they are muted – no doubt to stop people getting a fright!
To resolve it, change the code to this, using the muted attribute:
And you are good to go.
Internet Explorer v11 and Firefox v66 will play the video if not muted. Chrome v73 won’t.
Written by Stephen Moon
email: stephen at logicalmoon.com