NEWMeet the new Video Gallery — YouTube, TikTok, Instagram Reels, Vimeo and Twitch in one widget.
Guide

How to Autoplay Video on a Website

Updated September 2026 · 6 min read

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.

Frequently asked questions

Related

How to add a video background

Use a short, muted, looping MP4 behind your content, with a poster image and a dark overlay for readable text.How to add a video background