YouTube
Use to load a YouTube video within a façade that consists of the thumbnail and a play button.
This component speeds up initial page load by waiting until the play button is clicked before loading the resource-intensive YouTube embed.
Example
Using the widget
- Basic usage: Sets the video, which plays from beginning to end.
- Start time: Sets the time (in seconds) when to begin the video.
- End time: Sets the time (in seconds) when to end the video.
- Override thumbnail: Overrides default thumbnail to another quality.
Using the shortcode
Parameters
end_time
End time of the video, in seconds (optional, default is the end of the video)
html_id
HTML id of the element. Add only if needed to customize styling or needed by Javascript to perform a specific functionality.
max_width
The maximum width of the embedded YouTube component on the page in pixels (optional)
start_time
Start time of the video, in seconds (optional, default is the start of the video)
thumbnail_quality
Image quality of the thumbnail for the rendered component (optional, default is high)
youtube_id
YouTube ID of the video to embed.
This is the 11-character alphanumeric string in the YouTube URL —
for example: https://www.youtube.com/watch?v=G8OBk_72Ye0