Search code examples
google-chromevideohtml5-video

Chrome not autoplaying video


I'm using autoplay video sporadically throughout a client's site, however the below code is (for some reason), not autoplaying in Chrome(63.0.3239.132). Works fine in Safari and FF.

I am not getting any console errors either?

<video
    src="https://player.vimeo.com/external/247833422.hd.mp4?s=8d872a36d3dbe7f74e9613ab144d088b5bab6649&profile_id=174"
    poster=""
    preload
    autoplay
    loop
    muted>
</video>

Solution

  • Quick fix for Chrome:

    <video
        id="video1"
        src="https://player.vimeo.com/external/247833422.hd.mp4?s=8d872a36d3dbe7f74e9613ab144d088b5bab6649&profile_id=174"
        poster=""
        preload
        autoplay
        loop
        muted>
    </video>
        
    <script> 
        document.getElementById('video1').play(); 
    </script>