Search code examples
htmlgoogle-chromehtml5-video

Video plays in Firefox, but not on Chrome/Opera


At the website that I host https://shinesolar.com I have a video for the banner on the homepage. Well all of a sudden (no code changes were made to the website) today, the video stopped working. What happens is a flash of the video appears for a second, then a black background just takes its place. The video is still there because I can right click it and open it in a new tab, and it plays. Also, when I refresh the page sometimes the video plays. But rarely, if ever does it happen when you just navigate to the page. It also does not work in Incognito mdoe
HOWEVER, it works fine in Firefox. So I don't know what's going on here. Can somebody point me in the right direction?


Solution

  • Google changed it's video autoplay policy

    You have to make the video muted

    <video id="video" muted autoplay>
    

    You can check it here