Reputation: 2792
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
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
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
Reputation: 413
In addition to this, set the video to muted <video autoplay loop muted><source...
Upvotes: 2