X Enterprises
nuxt-x-affiliate

Video Embed

YouTube / Vimeo / direct-video embed via privacy-enhanced youtube-nocookie iframe.

Video Embed

The XAFVideoEmbed component renders a responsive video embed — accepts a YouTube URL, Vimeo URL, or direct video URL. YouTube URLs are normalized to youtube-nocookie.com for privacy-enhanced embeds. Optional autoplay (muted) and configurable aspect ratio.

Components

<XAFVideoEmbed />

<XAFVideoEmbed
  src="https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  title="Product demo"
  poster="/img/demo-poster.jpg"
  aspect-ratio="16/9"
/>

Props

PropTypeDefaultDescription
srcstringrequiredYouTube, Vimeo, or direct video URL.
titlestringrequiredVideo title (used as iframe[title] for a11y).
posterstringPoster image URL (passed to iframe poster attribute when supported).
aspectRatiostring"16/9"Aspect ratio (any CSS value, e.g. "4/3", "1/1").
autoplaybooleanfalseAuto-play muted.

The iframe is rendered with loading="lazy", referrerpolicy="strict-origin-when-cross-origin", and the standard accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture allowlist. The title renders as a caption below the iframe.


AI Context

component: XAFVideoEmbed
package: "@xenterprises/nuxt-x-affiliate"
use-when: YouTube / Vimeo / direct-video embed via privacy-enhanced iframe with configurable aspect ratio.
Copyright © 2026