How to autoplay an embedded video (and why it has to be muted)
Browsers block videos that start with sound. Here is how to make an embedded video play on its own, and when autoplay is a good idea at all.
A video that starts by itself can bring a landing page to life: a product in motion, a short loop in the header, a demo that runs while people read. But if you have ever tried it, you know browsers often refuse to start the video. Here is why, and how to get it right.
Why browsers block autoplay
Nobody likes a website that suddenly starts talking. That is why Chrome, Safari, Firefox and Edge all limit autoplay:
- Muted videos may start on their own. This is allowed in all major browsers.
- Videos with sound usually may not. They only autoplay in some cases, for example when the visitor has already interacted with the page or the site, and the rules differ between browsers.
So if you want autoplay to work reliably for everyone, the video has to start muted. Visitors can still turn on the sound with one click.
Autoplay with Vidlify
Take the embed code of your video (see How to embed a video on your website) and add two parameters to the address:
https://vidlify.to/e/VIDEO-ID?autoplay=1&muted=1
autoplay=1tells the player to start right away.muted=1starts it without sound, which is what browsers require.
The embed code from Vidlify already contains allow="autoplay" in the iframe, which is the permission the browser needs to let an embedded player start. If you write your own iframe, keep that attribute.
You can combine it with a start time, for example ?autoplay=1&muted=1&t=15 starts at second 15.
When autoplay is a good idea
- Short, silent clips that work without sound, like product shots, background visuals or screen recordings.
- A page that is about the video, where the visitor came to watch anyway.
When it isn't
- Long videos with speech. Muted, nobody understands them. Let people press play.
- Several videos on one page. Autoplaying all of them costs your visitors data and makes the page slow.
- Mobile visitors on data. A video that starts on its own uses their data allowance. The player only loads a quality that fits the screen, but it still downloads video.
Tips
- Put the key message in the picture, not in the sound. Muted autoplay should make sense without audio.
- Use subtitles burned into the video if speech matters, so the message comes across muted.
- Test on a phone. Mobile browsers are the strictest about autoplay and data.