Audio
The component for adding a playable audio clip.
Declaration
object AudioProperties
| Name | Type | Description |
|---|---|---|
role Required | string | Always |
URL Required | uri | The
|
accessibilityCaption | string | A caption that describes the content of the audio file. The text is used for VoiceOver. For more information about VoiceOver, see the Vision page in Accessibility. If you don’t provide |
anchor | Anchor | An object that defines vertical alignment with another component. |
animation | (ComponentAnimation | string("none")) | An object that defines an animation you apply to the component. Use the |
behavior | (Behavior | string("none")) | An object that defines behavior for a component, like Parallax or Springy. Use the |
caption | string | A caption that describes the content of the audio file. This text is used by VoiceOver if |
conditional | (ConditionalComponent | [ConditionalComponent]) | An instance or array of component properties that you can apply conditionally, and the conditions that cause Apple News Format to apply them. |
explicitContent | boolean | A Boolean value that indicates the audio may contain explicit content. |
hidden | boolean | A Boolean value that determines whether the component is hidden. |
identifier | string | An optional unique identifier for this component. If you use |
imageURL | string | The Image URLs can begin with Encode image filenames as |
layout | (ComponentLayout | string) | An inline If you don’t define |
style | (ComponentStyle | string | string("none")) | An inline Use the |
Mentioned in
Discussion
Audio is the abstract definition for all audio components. You can also include an image that represents your audio file.
See Preparing Image, Video, Audio, Music, and ARKit Assets.
Example
{
"components": [
{
"role": "audio",
"URL": "http://example.com/files/sample.mp3",
"caption": "Listen up!"
}
]
}