Skip to content
Rich Content

AudioPlayer

client70 kB
/mediaAudioPlayerProps

Preview

Props

4
PropTypeDefault

className

string

—

label

What a screen reader says of the clip.

string

—

labels

Partial<PlayerControlsLabels>

—

src

required
string

—

Slot props

3

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

PropTypeDefault

surfaceProps

The `<audio>` itself. `src` and the handlers the player needs are its own.

Omit<Omit<DetailedHTMLProps<AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "ref">, "src">

—

trackProps

The seek track, a real `range`.

Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">

—

volumeProps

The volume slider inside its popover.

Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">

—

Also accepts

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

Style props · 128