EmbeddingIframe code
Iframe code
The canonical Moviie Player embed snippet, with every attribute explained.
The recommended way to embed the Moviie Player is a plain HTML iframe. No script tag, no SDK, no build step.
Canonical snippet
<iframe
src="https://watch.moviie.ai/embed/VIDEO_ID"
title="Moviie Player"
allow="autoplay; fullscreen; picture-in-picture"
allowfullscreen
width="640"
height="360"
style="border: 0"
></iframe>Replace VIDEO_ID with the identifier displayed in the Moviie dashboard.
Required attributes
| Attribute | Why it matters |
|---|---|
src | Points the iframe at the Moviie embed route on watch.moviie.ai. |
title | Required for accessibility — assistive technologies announce the iframe by its title. |
allow | Grants the embed permission to autoplay, request fullscreen and enter Picture-in-Picture. |
allowfullscreen | Required by older browsers in addition to the allow="fullscreen" policy. |
Recommended attributes
| Attribute | Notes |
|---|---|
width / height | Hint to the layout engine. Pair them with the responsive wrapper so the player still scales. |
loading="lazy" | Defers loading until the iframe is close to the viewport — improves initial page weight. |
referrerpolicy="strict-origin-when-cross-origin" | Restricts how much referrer information leaks to the embed. |
Lazy-loaded variant
Use this variant when the player appears below the fold or inside a tab.
<iframe
src="https://watch.moviie.ai/embed/VIDEO_ID"
title="Moviie Player"
allow="autoplay; fullscreen; picture-in-picture"
allowfullscreen
loading="lazy"
referrerpolicy="strict-origin-when-cross-origin"
style="border: 0; width: 100%; height: 100%"
></iframe>Common pitfalls
- Skipping the
allowattribute — fullscreen and Picture-in-Picture silently fail in modern browsers without the explicit policy. - Hard-coding pixel sizes — embeds break on mobile when the iframe is wider than the viewport. Always pair fixed sizes with a responsive container.
- Embedding from an unauthorised domain — the embed refuses to load if your domain is not in the allowlist.