Embed YouTube videos

YouTube videos can be embedded into documentation using the <devsite-video> custom element, allowing users to view the content in an iframe. This widget tracks and sends usage statistics to Google Analytics.

Default

This is an example of a default embedded YouTube video that wraps <devsite-video> in a div element and sets its class attribute to video-wrapper.

On large screens, the video is 50% of the content area's width and floats to the right of any content the video precedes. On small screens, the video is 100% of the content area's width.

Floated left

This video floats to the left of any content it precedes by setting its class attribute to video-wrapper-left.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Full-width

This video is 100% of the content area's width and does not affect the layout of any content the video precedes by setting its class attribute to video-wrapper-full-width.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.