Login
Free Sign Up
Docs
/

Audio

Type identifier: audio Category: Experience Blocks

Description

Media block for rendering audio sources with optional sizing, replaced-element properties, and media control settings.

Schema Summary

The Audio block has these required fields, in addition to the shared properties:

  • type: "audio"
  • src

Optional audio-specific fields:

  • width, height
  • cssWidth, cssHeight
  • objectFit, objectPosition
  • autoPlay, loop, muted, controls
  • states

Properties

Property

Type

Required

Notes

id

string

Yes

Shared block identifier.

type

"audio"

Yes

Block discriminator.

src

URL, datumReference, or file reference

Yes

Media source.

width

number

No

Optional numeric width.

height

number

No

Optional numeric height.

cssWidth

CSS size | "auto"

No

CSS width override.

cssHeight

CSS size | "auto"

No

CSS height override.

objectFit

"fill" | "contain" | "cover" | "none" | "scale-down"

No

Replaced element fit behaviour.

objectPosition

string

No

Replaced element position.

autoPlay

boolean

No

Media autoplay option.

loop

boolean

No

Media loop option.

muted

boolean

No

Media muted option.

controls

boolean

No

Media controls visibility.

states

Array of states

No

Optional state-specific overrides.

The Audio block also supports the shared style/layout/data props.

States

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.

Minimal Valid Example

{
  "id": "audio-1",
  "type": "audio",
  "src": "https://cdn.example.com/track.mp3"
}