VideoPlayer
Native video controls, captions and transcript content.
Interactive preview
Transcript: A quiet study in shape and motion. This two-second clip has no speech.
Usage
import { VideoPlayer } from "@devvy-ui/react";
<VideoPlayer label="Studio study" sources={[{src:'/examples/studio.mp4',type:'video/mp4'},{src:'/examples/studio.webm',type:'video/webm'}]} tracks={[{src:'/examples/studio.vtt',srcLang:'en',label:'English'}]} transcript={<p>A quiet shape study.</p>} />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | required | Media name. |
| sources | {src,type}[] | [] | Ordered native codec fallbacks; use instead of a single src. |
| preload | none | metadata | auto | none | Media loading policy. |
| tracks | caption track[] | [] | Caption source/language/label/default. |
| transcript | ReactNode | — | Visible transcript content. |
| native video props | VideoHTMLAttributes | — | Sources, media events, ref and settings. |
Accessibility & behavior
Platform Behavior & Guidelines
Native playback, volume, fullscreen and caption controls are preserved. Preload defaults to none; provide typed sources for codec fallbacks, or a single src. Caption files and transcripts belong to the content owner; the component does not generate them.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add video-playerMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.