I have added a video to my site. Added code for autoplay in the video. It works fine on Firefox, but not auto playing in Chrome.
Here is the code I have added to show the video:
<video id="vid" autoplay="autoplay" loop="loop" width="100%" height="100%">
<source src="https://example.com/video.mp4" type="video/mp4" />
</video>
Also, when I face the issue, I searched for this and found a script. Here is what I have tried:
<script>
document.getElementById('vid').play();
</script>
But still, the video just below menu is not auto-playing on Chrome.
I have checked the Chrome autoplay guidelines and my video is not violating that. I have a muted video but still not auto playing.
Any workaround for that?
Thank you in advance.