Podcast
The component for adding a Podcast show or episode.
Declaration
object PodcastProperties
| Name | Type | Description |
|---|---|---|
role Required | string | Always |
URL Required | uri | The URL of the podcast show or episode you want to embed. The show or episode must be available on Apple Podcasts. Note that a user cannot play the show or episode directly in the article. For more information, see Apple Podcasts. The URL determines whether it is a show or an episode. The following is an example of a podcast show link:
The following is an example of a podcast episode link:
|
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 |
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. |
hidden | boolean | A Boolean value that determines whether the component is hidden. |
identifier | string | An optional unique identifier for this component. If you use |
layout | (ComponentLayout | string) | An inline If you don’t define |
orientation | string | The viewport layout of the component. Valid values:
|
style | (ComponentStyle | string | string("none")) | An inline Use the |
theme | string | The color theme of the component. Valid Values:
|
Discussion
Use the Podcast component to embed information about a podcast and link to it. You can embed information about a podcast show or episode into an article, and link to that show or episode.
The Podcast component uses two optional properties to provide basic layout and color theme customizations:
orientation. By default, thePodcastcomponent automatically adjusts the layout of the subcomponents depending on the viewport width of the device. On viewports less than 600 points (iPhone), the layout is vertical with artwork stacked on top of the podcast information. On viewports greater than 600 points (iPad), the layout is horizontal with artwork and podcast information appearing side by side. The artwork is on the left and the podcast information is on the right. If you’d like to specify a horizontal layout regardless of the viewport width of the device, use thehorizontalproperty.theme. By default, thePodcastcomponent automatically changes color styles depending on whether Dark Mode is turned on or off for the device the article appears on. If you’d like to specify a light or a dark appearance independent of the device setting, use thethemeproperty.
Example
{
"components": [
{
"role": "podcast",
"URL": "https://podcasts.apple.com/us/podcast/apple-events/id1473854035"
},
{
"role": "podcast",
"URL": "https://podcasts.apple.com/us/podcast/apple-events/id1473854035?i=1000479125753"
}
]
}