Type identifier:
audioCategory: Experience Blocks
Media block for rendering audio sources with optional sizing, replaced-element properties, and media control settings.
The Audio block has these required fields, in addition to the shared properties:
type: "audio"srcOptional audio-specific fields:
width, heightcssWidth, cssHeightobjectFit, objectPositionautoPlay, loop, muted, controlsstatesProperty | Type | Required | Notes |
|---|---|---|---|
|
| Yes | Shared block identifier. |
|
| Yes | Block discriminator. |
| URL, | Yes | Media source. |
|
| No | Optional numeric width. |
|
| No | Optional numeric height. |
| CSS size | | No | CSS width override. |
| CSS size | | No | CSS height override. |
|
| No | Replaced element fit behaviour. |
|
| No | Replaced element position. |
|
| No | Media autoplay option. |
|
| No | Media loop option. |
|
| No | Media muted option. |
|
| No | Media controls visibility. |
| Array of states | No | Optional state-specific overrides. |
The Audio block also supports the shared style/layout/data props.
State entries follow the shared state shape and support partial audio overrides.
Audio blocks do not support pseudo-state overrides. Media states are available; see Experience States and Print Layout.
{
"id": "audio-1",
"type": "audio",
"src": "https://cdn.example.com/track.mp3"
}