I am having trouble getting chrome to autoplay a video. I have set the video to muted and it auto plays in both Safari and Firefox but not chrome.
<video autoplay muted poster="path to video" id="bgvid">
<source src="assets/uploads/hero/livePhotoNoSound.mp4" type="video/webm">
<source src="assets/uploads/hero/livePhotoNoSound.mp4" type="video/mp4">
</video>
I want to video to start playing automatically. Currently the video loads, but is just still. Everything I've read says that as long as it's muted it should play, but that is not the result I'm getting.
Main answer worked with me - but just in case anyone is trying to get it to work on apple phones you must use the "playsinline" attribute for it to work. for example:
<video playsinline autoplay muted loop id="myVideo">
<source src="xen.mp4" type="video/mp4">
</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