How to autoplay video on a website
Why autoplay is blocked
To protect users from unexpected sound, browsers allow autoplay only when the video is muted (or after the user has interacted with the site). Muted autoplay is always allowed.
Autoplay an HTML5 video
<video autoplay muted loop playsinline poster="poster.jpg">
<source src="clip.mp4" type="video/mp4">
</video>playsinline keeps the video in the page on iPhone instead of opening fullscreen.
Autoplay a YouTube or Vimeo embed
YouTube: add autoplay=1&mute=1. Vimeo: add autoplay=1&muted=1. Our YouTube and Vimeo generators add these for you.
Details for YouTube: How to autoplay embedded YouTube videos.
When not to autoplay
Long videos with important audio.
Several autoplaying videos on one page.
Pages where speed matters most — autoplay loads the video immediately.
On this page
