Video Player
Native video wrapped in token-styled custom controls: seek, volume, playback speed, and fullscreen.
Import
import { VideoPlayer } from "@cronus-ui/ui";
npx cronus-ui add video-player
Examples
API Reference
Generated from the component's exported types.
VideoPlayerProps
Extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof videoPlayerVariants>
| Prop | Type | Default | Description |
|---|---|---|---|
src* | string | — | Video source URL. |
poster | string | — | Preview image shown before the first frame is available. |
autoPlay | boolean | false | Starts playback automatically once the media can play. |
loop | boolean | false | Restarts playback from the beginning when the video ends. |
muted | boolean | false | Starts with the audio muted. |
aspect | "video" | "square" | "wide" | "video" | Frame aspect ratio: 16:9 (`"video"`), 1:1 (`"square"`) or 21:9 (`"wide"`). |
labels | Partial<VideoPlayerLabels> | — | Control-label overrides for i18n. Every label defaults to English. |
videoRef | Ref<HTMLVideoElement> | — | Ref to the underlying `<video>` element, for imperative control. |
children | ReactNode | — | Extra media children, e.g. a captions `<track>` or additional `<source>` elements. |