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.

ClassDescription
JWPlayerConfigurationWhen added to this class, the JWExternalMetadata object applies to all media items within a playlist.
JWPlayerItemWhen 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 both JWPlayerConfiguration and JWPlayerItem, the JWExternalMetadata for the JWPlayerItem is honored. The JWExternalMetadata for the JWPlayerConfiguration is ignored.

The following recipes demonstrate how to set metadata for an entire playlist or single media item.