AudioPlayer native
An inline audio player with a title and native controls.
Preview
Loading the renderer…
createSurface + updateComponents, A2UI v0.9.
json
[
{
"version": "v0.9",
"createSurface": {
"surfaceId": "preview",
"catalogId": "https://ui.exponential.at/catalogs/core/v1"
}
},
{
"version": "v0.9",
"updateComponents": {
"surfaceId": "preview",
"components": [
{
"id": "root",
"component": "Stack",
"direction": "vertical",
"align": "stretch",
"children": [
"example"
]
},
{
"id": "example",
"component": "AudioPlayer",
"src": "https://example.com/track.mp3",
"title": "Episode 12"
}
]
}
}
]This surface through a MemoryTransport. Install and transports: React guide.
This surface through a MemoryTransport. Install and transports: SwiftUI guide.
This surface through a MemoryTransport. Install and transports: Compose guide.
This surface through a MemoryTransport. Install and transports: gpui guide.
Platforms




View exponential-ui-audio-player, painted by each native renderer.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
srcrequiredbind | url | – | The audio URL. |
title | string | – | What is playing. |
durationMs | number | – | Known length for the scrubber. |
Events and slots
No events, no slots. Children: none.
Accessibility
- Role
group- Semantics
- audio with the platform's controls
| Keys | Action |
|---|---|
| Space | play/pause; ArrowLeft/ArrowRight: seek 5 s |
Theming
- Recipe parts
AudioPlayer/rootAudioPlayer/controlsAudioPlayer/track- Keyed by
:hover:pressed:focus:disabled:checked:open:selected:invalid:dragover