Add metadata information to the Info panel in Apple TV.
When you swipe down on the Siri Remote touchpad,
AVPlayer in tvOS presents an Info panel, revealing information and controls for the current presentation. The top section of the panel’s Info tab displays metadata describing the currently presented media.
Define Metadata Identifiers
The Info panel is automatically populated if the presented media contains supported metadata. However, there are cases where this metadata doesn’t exist, is incomplete, or can be determined only at runtime. To handle these scenarios, AVKit in tvOS adds an
external property to
AVPlayer. You can use this property to set an array of
AVMetadata objects defining your custom metadata.
AVFoundation defines a large number of metadata identifiers (see
AVMetadata), but the Info panel currently supports only the five listed below.
Populate the Info Panel
AVMetadata is an immutable type, so to create your custom metadata, you use its mutable subclass,
AVMutable. For a metadata item to be presented in the Info panel, you need to provide values for the item’s
extended. For the
extended property, provide a valid BCP-47 string value such as
und if undetermined).
The following example shows how to create the player item’s
external used to populate the player’s Info panel: