Audience and Discovery

Embedding Video on a Website

How site owners can add video to a page: self-hosting versus third-party players, what embedding does to page speed, and how to choose a player sensibly.

On this page
  1. What embedding actually means
  2. Option 1: a platform embed
  3. Option 2: the browser’s own video element
  4. Option 3: a dedicated video hosting service
  5. Page speed: what embedding does
  6. Choosing and judging a player
  7. Does embedding help people find the video?
  8. A sensible starting point

What embedding actually means

To embed a video is to display it inside your own page while the video file is stored and delivered from somewhere else or from your own server. There are two broad approaches. You can paste an embed snippet from a video platform, which loads that platform’s player inside your page. Or you can place the video directly using the browser’s built-in video element and serve the file yourself or through a hosting service.

Neither is always better. The right choice depends on how much control you need, how much traffic you expect, what you can afford to maintain and what you want viewers to see around the video.

Option 1: a platform embed

A platform embed is usually a short piece of code, often an iframe, supplied next to the video. You paste it into the page and the platform’s player appears.

The appeal is simple. The platform handles storage, conversion into several qualities, delivery to different devices and the player itself. You do not need to understand the streaming pipeline to get a working result, and the video can keep working on slow connections because the platform adapts the quality for each viewer.

The trade-offs are also real:

  • The player is loaded from another company’s servers, which adds requests to your page and often brings that company’s scripts and cookies with it.
  • You have limited control over the look of the player and over what appears when the video ends, which may include other suggestions you did not choose.
  • If the original video is removed, made private or changed, your page is affected.
  • Features, branding options and rules change over time, so check the platform’s current documentation instead of relying on memory.

Embedding a platform video also affects privacy. Third-party players may set tracking identifiers, and in some regions that raises consent questions. The rules vary by country, and this is not legal advice; many platforms offer a privacy-enhanced or reduced-tracking embed mode, which is worth looking for.

Option 2: the browser’s own video element

Modern browsers can play video without any plug-in using a standard video element. You point it at a file, add a poster image and choose whether to show controls. This keeps everything on your own domain and gives you full control over layout.

The catch is that a single large file is not what streaming services deliver. If you offer one file at one quality, a viewer on a weak connection may wait a long time or watch with constant pauses, while a viewer on a fast one gets a picture that is lower quality than it could be. Choosing a sensible video bitrate and sticking to widely supported formats helps, and the details of how formats are packaged are covered in container formats. For a short product loop or a brief clip, a single well-compressed file is often fine. For anything long, adaptive delivery is generally better.

Option 3: a dedicated video hosting service

A third route sits between the first two. Specialist hosting services let you upload once, receive adaptive streams and embed a player that you can customise more than a general platform’s. Some include analytics, access controls and options to remove the unrelated suggestions that a social platform might show.

The usual costs are a subscription or usage-based fee and another service to depend on. Compare current terms carefully, because prices and limits change. If your site needs private videos for customers or staff, this option, or a self-built setup behind a login, is often considered.

Page speed: what embedding does

Video is one of the heaviest things a page can contain, and an embed can slow a page even before anyone presses play. The main reasons are:

  • A third-party player loads scripts, fonts and images when the page loads.
  • Several embeds on one page multiply that cost.
  • Autoplaying video begins downloading immediately.
  • A large poster image can be a significant part of what the browser must fetch first.

Several habits reduce the damage:

  1. Use a lightweight stand-in image. Show a poster image with a play button and load the real player only when someone clicks. This is often called a facade, and it keeps the initial load small.
  2. Load lazily. Videos below the visible part of the page do not need to load until the reader scrolls near them.
  3. Reserve space. Give the video container a fixed aspect ratio so the page does not jump around as the player appears. This avoids layout shifts that annoy readers.
  4. Avoid autoplay with sound. Browsers commonly block it anyway, and it surprises people.
  5. Limit the number of embeds per page. One strong video usually does more than six.

If you do use a native video element, setting the preload behaviour so the browser fetches only metadata until playback starts can also save data.

Choosing and judging a player

When you compare players, whether built in or from a service, consider:

  • Accessibility. Can the controls be used with a keyboard? Does the player support caption files and show them clearly? See video accessibility for the wider picture.
  • Mobile behaviour. Does it work well in portrait and landscape, and handle aspect ratios sensibly on small screens?
  • Quality switching. Does it adapt to the viewer’s connection through adaptive bitrate delivery, or does it serve one fixed file?
  • Fallbacks. What does the viewer see if scripts are blocked or the video fails to load? A short text description and a link to a transcript are a useful safety net.
  • Dependence. Who controls the player, and what happens if the service changes or closes?

Does embedding help people find the video?

Putting a video on a page can make the page more useful, and surrounding text is something search systems can read. But whether a search engine shows your page, the video or both depends on how the page is built and marked up, which is the subject of video SEO. Viewers who watch an embedded platform video may also be counted differently in that platform’s own views and watch-time figures than viewers who watch on the platform itself, so do not assume the numbers will line up with your site’s analytics.

A sensible starting point

For a small site with occasional videos, a platform embed behind a click-to-load poster image is usually the simplest approach. For a site where video is central, a dedicated host or a carefully built self-hosted setup gives more control at the cost of more work. Whatever you choose, test the page on a phone over a mobile connection, because that is where heavy embeds tend to show their weight first.

The complete guide to audience and discovery

How Video Search and Discovery Work
Read the guide

Keep exploring

Guides from other topics

All topics →