The Video
component is used to display videos in your webpage using the HTML5 video tag.
import { Video } from '~/core/ui/Video';
<Video src='/videos/video.mp4' />
The Video
component is automatically lazy loaded, meaning that the video will only be loaded when it is visible in the viewport.
While loading, the Video
component will display a loading indicator. Once the video is loaded, the loading indicator will be replaced by the video.
Props
src
- The source of the video.className
- The class name to apply to the video element.poster
- The poster image to display before the video is loaded.width
- The width of the video.type
- The type of the video. Defaults tovideo/mp4
.