Video
The
<Video>
Example
Vimeo
Video in MDX
Code
VimeoVideo<Video title="Carbon homepage video" vimeoId="322021187" />
Video in MDX<Video src="/videos/hero-video.mp4" poster="/images/poster.png"><trackkind="captions"defaultsrc="/videos/vtt/hero-video.vtt"srcLang="en"/></Video>
import localVideo from './local-video.mp4';import localPoster from './local-poster.jpg';<Video src={localVideo} poster={localPoster} />
Props
property | propType | required | default | description |
---|---|---|---|---|
vimeoId | string | To find your
| ||
src | string | Use the html
| ||
title | string | Vimeo title | ||
poster | string | Provides an image to show before the video loads, only works with
| ||
children |
| non-vimeo only – Provide
| ||
autoPlay | boolean | Whether or not the video should autoplay. |