Set external metadata (iOS)
Use JWExternalMetadata to add external metadata to an entire playlist or single media item.
A JWExternalMetadata object supplements the underlying metadata of the media asset.
For example, if you wanted to enable your app to respond to custom timed metadata, a handler can be placed into a time observer, such as onTime. However, this approach could have a performance impact. As an alternative, you can use JWExternalMetadata to surface custom timed metadata.
Set metadata
The JWExternalMetadata object can be added to one of two classes: JWPlayerConfiguration or JWPlayerItem.
| Class | Description |
|---|---|
JWPlayerConfiguration | When added to this class, the JWExternalMetadata object applies to all media items within a playlist. |
JWPlayerItem | When added to this class, the JWExternalMetadata object applies to the specific media item. |
- If more than 5
JWExternalMetadataitems are set for a playlist or single media item, only the first 5 are honored.- If
JWExternalMetadatais set for bothJWPlayerConfigurationandJWPlayerItem, theJWExternalMetadatafor theJWPlayerItemis honored. TheJWExternalMetadatafor theJWPlayerConfigurationis ignored.
The following recipes demonstrate how to set metadata for an entire playlist or single media item.
📱
iOS v4: Add external metadata to a playlist
Open Recipe
📱
iOS: Add external metadata to a media item
Open Recipe
Updated almost 2 years ago
