Embed API

A video player you drop into any page

One iframe. You keep the page; Vidy plays the title. Movies and series take a TMDB id, anime an AniList id. Query flags set color, autoplay, and episode controls. Listen to postMessage if you want continue-watching on your own backend.

Step 1

Pick a route

Movies use a TMDB id. Series add season and episode. Anime uses an AniList id.

/movie/{tmdbId}
/tv/{tmdbId}/{season}/{episode}
/anime/{anilistId}/{episode}

Step 2

Drop the iframe

Give it a 16:9 box and copy the allow attribute. Without autoplay * the player will not start with sound.

allow="encrypted-media; autoplay *; fullscreen *"

Step 3

Tune with query flags

color, progress, autoplay, nextEpisode, episodeSelector, autoplayNextEpisode. All opt-in.

/movie/315162?color=DC2626&autoplay=true

Live preview

Player playground

Point this at a title, flip the options, and copy the iframe for your site. The preview is the same player your visitors will see.

Preview size
Type
Embed URL/movie/315162?color=DC2626
Loading preview…

Wide 16:9. The player fills whatever box you give it — try Small to see the compact chrome.

Reference

Embed Vidy on your site

Routes, iframe snippet, query flags, autoplay rules, and postMessage events. Copy from here when you leave the playground.

Routes

Movies use a TMDB id. Series add season and episode. Anime uses an AniList id plus episode. Missing season or episode values default to 1.

/movie/{tmdbId}
/tv/{tmdbId}/{season}/{episode}
/anime/{anilistId}/{episode}

Minimal iframe

Give the iframe a real box. Width 100% and a 16:9 height (or aspect-video) is enough. Copy the allow attribute exactly as written; the * after autoplay and fullscreen matters (see Autoplay below).

<iframe
  src="https://vidy.st/movie/315162?color=DC2626"
  width="100%"
  height="100%"
  frameborder="0"
  allowfullscreen
  allow="encrypted-media; autoplay *; fullscreen *"
></iframe>

Autoplay

Off by default. Add autoplay=true and the player starts with sound as soon as a stream is found. It never falls back to muted playback: if the browser refuses, the poster and a play button stay on screen and the first click starts playback with sound. Browsers allow it only when the visitor has already clicked somewhere on the page that embeds the player, and the iframe delegates the permission through allow.

How the allow attribute is evaluated

Each feature in allow is followed by an allowlist of origins. If you write no origin, the browser uses 'src', which means "the origin of the URL in the src attribute". The check is made against the origin of the document that is actually loaded in the frame.

You writeBrowser reads it asResult
allow="autoplay"autoplay 'src'Works only if the document loaded in the iframe has the same origin as the URL you put in src. If that URL redirects to another domain, the origins no longer match and autoplay is blocked, even after the visitor clicked on the page that embeds the player.
allow="autoplay *"any originWorks regardless of redirects or which player domain serves the page. Recommended.
allow="autoplay https://www.vidy.st"that origin onlyWorks, as long as the listed origin is the one that is finally loaded (scheme and host must match exactly, www included).

The same rule applies to fullscreen, hence fullscreen * in the snippet. To check your setup, run document.featurePolicy.allowsFeature("autoplay") in the DevTools console with the Vidy frame selected as context; it must print true.

Query options

Flags are opt-in. If a key is missing, that feature stays off — except color, which falls back to red.

ParamWhereExampleWhat it does
colorAllDC2626Player accent as a 6-digit hex, without #. Buttons and focus rings pick this up.
progressAll120Start playback at this many seconds. Useful when you already store watch position on your side.
autoplayAlltrueOff by default. Set to true to start playback with sound as soon as a stream is found, when the browser allows it (see Autoplay below). If blocked, the player waits for a click on the play button.
nextEpisodeTV, animetrueAdds a Next Episode control in the top bar when another episode exists.
episodeSelectorTV, animetrueAdds an Episodes control on the bottom bar that opens a fullscreen season/episode picker.
autoplayNextEpisodeTV, animetrueWhen the current episode ends, the player continues to the next one automatically.

Worked examples

/movie/315162?color=22C55E&progress=90
/movie/315162?autoplay=true
/tv/1396/1/1?nextEpisode=true&episodeSelector=true&autoplayNextEpisode=true
/anime/21/1?color=FFFFFF&episodeSelector=true

Talking to the parent page

The player posts JSON strings to window.parent. Listen on your page, parse the payload, and ignore anything that is not from your embed.

TypeWhenShape
PLAYER_EVENTDuring playback{ event: "timeupdate" | "play" | "pause" | "ended", currentTime, duration, ... }
MEDIA_DATAAbout once a second{ type: "MEDIA_DATA", data: "<serialized local history>" }
window.addEventListener("message", (event) => {
  if (typeof event.data !== "string") return;
  try {
    const payload = JSON.parse(event.data);
    if (payload.event === "timeupdate") {
      // persist payload.currentTime
    }
  } catch {}
});

What Vidy does not do

There is no catalog, account wall, or watchlist in this app. Those live on the site that embeds the player. Keep titles, artwork, and continue-watching on your side; send progress when the user comes back.