Video on your website: captions, autoplay and what it does to page speed
A video can show what words can’t, or quietly slow your page and shut people out. How to add captions, handle autoplay and keep video from weighing your site down.
Video on your website can do a lot of good. A short clip of your workshop, your dishes or your product in someone’s hands says more than a paragraph could. But the same clip can also slow your page down, blast sound at someone in a quiet office, or leave out every visitor who can’t hear it. Each of these problems has a simple fix, and you can check for all of them yourself.
This post covers the three things that decide whether a video helps or hurts: captions, autoplay and speed.
First, ask what the video is for
Before you look at settings, decide what job the video does. Most videos on small business sites fall into one of three groups:
- A video people choose to watch: a product demo, a how-to, a short introduction to who you are.
- A background clip: moving footage behind your headline, used for atmosphere.
- A small animation: a looping clip that shows a product turning or a step being done, often added as an animated GIF.
The first kind needs captions and good controls. The other two need to stay light, silent and easy to stop. If a background clip says nothing a good photo couldn’t, use the photo; our post on real photos versus stock photos can help you pick one.
Captions: for everyone who can’t, or won’t, listen
Captions are the words spoken in the video, shown as text on screen in time with the speech. The W3C’s guide to captions and subtitles explains that they provide content to people who are Deaf and hard of hearing, and that they are also used by people who process written information better than audio.
There is a practical side too. Plenty of people browse on their phone where they can’t play sound, on a train or in a waiting room. Without captions, a video with speech is just moving pictures to them.
What about automatic captions? Platforms like YouTube can create captions for you, and that is a useful start. But the same W3C guide is clear that automatic captions don’t meet user needs or accessibility requirements unless someone has checked that they are fully accurate, and warns that the automatic text is often wrong. Names, prices, product terms and local place names are where they go wrong most.
So the job is short: turn on automatic captions, then read them through once while the video plays and correct the mistakes.
Good captions also:
- include who is speaking when it isn’t obvious;
- mention sounds that matter, like a doorbell or laughter;
- are switched on as an option in the player, not burned into the picture where they can’t be turned off or enlarged.
Autoplay: when it’s fine and when it isn’t
Autoplay means the video starts on its own when the page loads. It is not always wrong, but it should follow two rules.
Rule 1: never start with sound. Browsers already push sites in this direction. Chrome’s autoplay policy says that muted autoplay is always allowed, while autoplay with sound is only allowed in certain cases, such as after the visitor has interacted with the site. For accessibility, the W3C’s guidance on audio control asks that if any audio plays automatically for more than 3 seconds, there must be a way to pause or stop it, or to change its volume separately from the computer’s own volume. The reason is simple: people who use screen readers can find it hard to hear their screen reader’s speech over other sound.
Rule 2: let people stop anything that moves. A looping background video can be a real distraction while someone tries to read your headline. The W3C’s rule on pausing moving content says that moving content which starts automatically, lasts more than five seconds and sits alongside other content needs a way for the visitor to pause, stop or hide it. In practice, that means a visible pause button on your background video, one that works with the keyboard too. Our keyboard navigation check shows how to test that.
For a video people choose to watch, the best choice is usually no autoplay at all. Google’s web.dev guide on video performance puts it plainly: autoplay should only be used when necessary.
What video does to page speed
Video files are big, and how you add them decides how much of that weight lands on your visitors before they have even decided to press play.
Autoplaying videos download straight away. The web.dev guide notes that autoplaying videos begin downloading immediately, even if they are further down the page. A background clip on your homepage is part of the first load for every visitor, on every phone connection.
The first frame can become your slowest moment. The same guide explains that a video’s first frame counts as a candidate for Largest Contentful Paint, the measure of how quickly the main content appears. If your hero is a video, its first frame may be what your speed score is waiting for. Our post on Largest Contentful Paint explains why that matters.
Embedded players are heavy even before anyone presses play. A YouTube or Vimeo embed loads the player itself as soon as the page opens. Chrome’s guide to lazy loading with facades shows an example where a lightweight stand-in weighs 3 KB, while the 540 KB YouTube player only loads when someone clicks.
Animated GIFs are heavier than they look. The web.dev article on lazy loading video notes that animated GIFs can run to several megabytes, and that videos of similar quality tend to be far smaller.
How to keep video light
You don’t need to write code for these. Most site builders and video plugins have a setting for each one, and a developer will recognise every item.
- Show a preview image first. Use a still image (often called a poster or thumbnail) in place of the video until someone presses play. Make it a sharp, well-compressed photo that tells people what the video is.
- Don’t preload videos people have to start themselves. The web.dev guide recommends
preload="none"for videos the visitor must start, so the browser doesn’t fetch the file in advance. - Use a “lite” embed for YouTube and Vimeo. Many plugins offer a “lazy load” or “click to load” option that shows a picture of the player and loads the real one only on click.
- Keep background clips short, small and silent. Trim them to a few seconds, compress them, and remove the audio track. The web.dev guide points out that removing the audio stream makes the file smaller.
- Replace animated GIFs with short muted videos. Same look, a fraction of the weight.
How to check the video on your website in ten minutes
- Open the page on your phone with mobile data, not Wi-Fi. Does the page feel slow until the video appears? Does anything start playing on its own?
- Listen. Did any sound start without you pressing play? That is the first thing to fix.
- Look for the pause button. If something moves, can you stop it? Try reaching that button with the Tab key on a computer.
- Turn the sound off and watch. Switch on captions. Can you follow everything? Read the captions for wrong names, prices and terms.
- Run your page through PageSpeed Insights. If the video, or its preview image, is named as the largest element, it is worth slimming down. Our guide to reading a PageSpeed report walks you through it.
- Search your site for animated GIFs. Each one is a candidate for a short video instead.
Video problems are among the things we flag in our landing page audits, because a hero video can make a page feel slow and busy in the very seconds a visitor decides whether to stay. If you want a wider look at accessibility, our 15-minute accessibility test covers the rest of the page.
Your website video checklist
- Every video with speech has captions you have read through and corrected
- Captions can be turned on in the player, not only burned into the picture
- Nothing plays sound on its own when the page loads
- Background or looping videos have a visible pause button that works with the keyboard
- Videos people start themselves show a preview image and don’t preload
- YouTube or Vimeo embeds load the full player only on click
- Animated GIFs have been replaced with short, muted videos