Video embed

Preview#

The remote player loads only after the play button is activated.

Boundary#

The bridge accepts an 11-character YouTube video ID and constructs a privacy-enhanced embed URL. The thumbnail must be a local asset so opening the page does not contact the video provider.

Example

{{< video-embed id="M7lc1UVf-VE" title="YouTube Developers Live: Embedded Web Player Customization" thumbnail="/images/home/ben-speaking-les-affaires-2020.jpg" alt="Benoît H. Dicaire speaking on stage" >}}

When to use

A Markdown bridge to the shared deferred video-embed component.

Implementation

layouts/shortcodes/video-embed.html

Options

OptionRead by the shortcode template
idRead by the shortcode template
titleRead by the shortcode template
thumbnailRead by the shortcode template
altRead by the shortcode template
captionRead by the shortcode template

Interface manifest

Kind
Shortcode
Category
Content
Status
Implemented
Implementation
Partial:layouts/partials/video-embed.htmlShortcode:layouts/shortcodes/video-embed.htmlCSS:assets/css/site.cssJavaScript:assets/js/site.jsi18n:videoEmbedPlayvideoEmbedWatch
Related interfaces
Video embed