Skip to content
FrameworkStyle

Add a poster placeholder

Show a lightweight placeholder while the poster image loads

To show something while your video’s poster loads, customize the image drawn by the skin or the Poster component.

The examples keep the placeholder aligned with the poster position. Change contain to cover if your poster fills its container.

Use a packaged skin

Put your image in the skin’s poster slot. If you leave off src, the poster component fills it from the player while your background shows underneath:

<video-player>
  <video-skin>
    <mux-video
      src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM.m3u8"
      playsinline
    ></mux-video>
    <img
      slot="poster"
      alt=""
      style="background: url('data:image/webp;base64,…') var(--media-object-position, center) / contain no-repeat"
    >
  </video-skin>
</video-player>

Use an ejected skin

When you own the skin template, put the placeholder on its fallback poster image instead:

<media-poster>
  <img
    alt=""
    style="background: url('data:image/webp;base64,…') var(--media-object-position, center) / contain no-repeat"
  >
</media-poster>