v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

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:

PropTypeDefaultDescription
labelstringrequiredMedia name.
sources{src,type}[][]Ordered native codec fallbacks; use instead of a single src.
preloadnone | metadata | autononeMedia loading policy.
trackscaption track[][]Caption source/language/label/default.
transcriptReactNode—Visible transcript content.
native video propsVideoHTMLAttributes—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-player

Make 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.

VideoPlayer.tsxREACT / TSX

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.