2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Components

Media players

Updated: August 31, 2026
View on GitHub
Media decides what to render by looking at the file extension, and hands video off to a player. MediaVideoPlayer and MediaAudioPlayer are those players, and you can reach for either directly. You need them directly in two situations: when the source has no usable extension — a blob: URL from MediaRecorder, a signed URL with the type in a query string — so Media cannot sniff it; and when the media is the component, as in an audio player that has no visual counterpart at all. Both live on the ./components/* subpath rather than the root barrel, so they are not pulled into every bundle that imports something from Once UI. A video surface with play/pause, a scrubbable progress bar and elapsed time. It is the right component for an extension-less source:
MediaVideoPlayer
Type
Default
src
Video source. Required.
string
autoplay
Start playing as soon as the video can play.
booleanfalse
loop
Restart when playback reaches the end.
booleanfalse
muted
Start muted. Autoplay is blocked with sound in most browsers.
booleantrue
objectFit
How the frame fits its box.
CSSProperties["objectFit"]"cover"
className
string
Play/pause, a scrubbable progress bar and elapsed/total time, laid out as a row rather than a surface. It takes every Column prop, so it sits in a layout like any other block. onTimeUpdate fires on every timeupdate with the position in seconds. The player owns playback; the caller owns what that position means — highlighting the paragraph being narrated, advancing a transcript, moving a chapter marker.
MediaAudioPlayer
Type
Default
src
Audio source. Required.
string
autoplay
Start playing as soon as the audio can play.
booleanfalse
loop
Restart when playback reaches the end.
booleanfalse
label
Accessible name for the player group.
string"Audio player"
onTimeUpdate
Fires on every timeupdate with the position in seconds.
(currentTime: number) => void
onPlayingChange
Fires when playback starts or stops.
(playing: boolean) => void
…and every FlexProps propinherited
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club