(Added in 11.0)

In interaction web forms, an audio element plays a sound file.



start:
  await:
    form:
      title: Audio Example
      elements:
        audio/prompt_audio:
          label: Play audio:
          autoplay@bool: yes
          controls@bool: yes
          source:
            blob: data:audio/mpeg;base64,...
            #uri: cerb:resource:...


Syntax

label:

The optional label to display above the form element.

autoplay:

If no, the audio only starts when the play button is pressed. The default is yes.

controls:

If no, the player controls are hidden. The default is yes.

loop:

If no (default), the audio plays once and stops. If yes the audio repeats indefinitely.

source:

Must be one of:

Source Description
blob: A data URI with base64-encoded MPEG data (data:audio/mpeg;base64,...)
uri: A cerb:automation_resource:<token> token. This can be created with file.write: or http.request: