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
JWExternalMetadata
items are set for a playlist or single media item, only the first 5 are honored.- If
JWExternalMetadata
is set for bothJWPlayerConfiguration
andJWPlayerItem
, theJWExternalMetadata
for theJWPlayerItem
is honored. TheJWExternalMetadata
for theJWPlayerConfiguration
is 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 about 1 year ago