Video
Video shows a video file, or a video from YouTube, Vimeo or Loom. It knows which from src: a file ending in .mp4, .webm, .ogg or .mov plays in the browser’s own player; any other address is embedded.
A video file
<Video src="/videos/flower.mp4" width="480px" caption="A video file, with the browser's controls." />A file in your project is a path from the project folder, like an image.
An embedded video
Use the video’s embed address - for YouTube, https://www.youtube.com/embed/<id>, not the watch?v= one:
<Video src="https://www.youtube.com/embed/dQw4w9WgXcQ" width="480px" title="A YouTube video" caption="An embedded YouTube video." />A looping clip
For a short clip that plays like an animated image - a UI interaction, say - turn on autoplay and loop, and turn off controls. A video that plays by itself is always muted, since browsers block autoplay with sound:
<Video src="/videos/clip.mp4" width="320px" autoplay loop controls={false} />Props
A video file - a path or URL - or a video’s embed address.
The video’s width on a wide screen - any CSS width, like "80%" or "500px".
Text under the video. With a caption, the video sits in a bordered card.
The video’s name, for screen readers - set it on an embedded video.
The player’s controls. Video files only - an embed shows its own.
Plays as soon as the page loads, muted. Video files only.
Starts again at the end. Video files only.
Starts with the sound off. Video files only.