Skip to content
Rich Content

Player

client70 kB
/mediaPlayerProps

Preview

Props

16
PropTypeDefault

className

string

—

controls

booleantrue

labels

Partial<PlayerLabels>

—

light

string | booleanfalse

loop

booleanfalse

muted

booleanfalse

onClose

(() => void)

—

onEnded

(() => void)

—

onError

((error: unknown) => void)

—

onReady

(() => void)

—

opened

boolean

—

playing

booleanfalse

ratio

number16 / 9

src

required
string

—

title

ReactNode

—

volume

number

—

Slot props

1

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

surfaceProps

The player inside the frame. It is the only node in the catalogue that renders a peer — react-player — and that is why it is typed with the attributes of the `video` it renders and not with `BoxSlotProps`: the component governs its `src`, its size and its handlers.

Omit<DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "ref">

—

Also accepts

On top of its own props, this component forwards these groups.

Style props · 128