I doing a website where I need to put a background video on a div. Everything work fine except the autoplay on Chrome.
I have both autoplay and muted on my tag and I've tried too with a javascript that play the video but neither of theses worked for me.
video id="myVideo" autoplay muted loop
and
document.getElementById('myVideo').play()
On safari it works fine, but when I try on Chrome, the video never autoplay. If I run the script on the Chrome console, it starts playing so I don't know what to do...