dungey_140
dungey_140

Reputation: 2792

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>

Upvotes: 5

Views: 5358

Answers (3)

Vikas Kandari
Vikas Kandari

Reputation: 1852

According to Google Chrome's policy, unmuted videos will not auto play or programmatically play. To auto play video, just mute your video by adding muted attribute like below:

<video autoplay loop muted="muted"></video>

Upvotes: 3

I.Manev
I.Manev

Reputation: 727

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> 

Upvotes: 6

rob_was_taken
rob_was_taken

Reputation: 413

In addition to this, set the video to muted <video autoplay loop muted><source...

Upvotes: 2

Related Questions