The JWP iOS SDK contains delegate methods created to <a href="/players/docs/ios-listen-for-events" target="_blank">listen for events</a>. The following sections describe each delegate method.

<br />




## Ads



When using the `JWPlayerView`, your must supply your own delegate to the `JWPlayer` object.

<br />

### jwplayer(\_: adEvent:)

Reports when an event is emitted by the player



Learn about the information contained in the <a href="https://sdk.jwplayer.com/ios/v4/reference/Classes/JWAdEvent.html" target="_blank"><code>JWAdEvent</code></a> class.

<br />




## Chapters



When using the `JWPlayerView`, your must supply your own delegate to the `JWPlayer` object.

<br />

### jwplayer(\_: beganChapter chapter:)

Called when a chapter begins and contains a description of the chapter



Learn about the information contained in the <a href="https://sdk.jwplayer.com/ios/v4/reference/Classes/JWCue.html" target="_blank"><code>JWCue</code></a> class.

<br /><br />

### jwplayer(\_:endedChapter:)

Called when a chapter ends and contains a description of the chapter



Learn about the information contained in the <a href="https://sdk.jwplayer.com/ios/v4/reference/Classes/JWCue.html" target="_blank"><code>JWCue</code></a> class.

<br /><br />

### jwplayer(\_: loadedChapters:)

Called when the chapters are loaded for the currently playing content



Learn about the information contained in the <a href="https://sdk.jwplayer.com/ios/v4/reference/Classes/JWCue.html" target="_blank"><code>JWCue</code></a> class</a>.

<br /><hr />

## Metadata

By listening to metadata events, you can gather more information about the playing content or response to custom cues. Each metadata class contains unique media information.



When using the `JWPlayerView`, your class my conform to a specific metadata delegate.

<br />

### jwplayer(\_:dateRangeMetadata metadata:)

Triggered when the content has entered the date range defined by the metadata cue



Learn about the information contained in the <a href="https://sdk.jwplayer.com/ios/v4/reference/Classes/JWDateRangeMetadata.html" target="_blank"><code>JWDateRangeMetadata</code></a> class</a>.

<br /><br />

### jwplayer(\_: dateRangeMetadataCueParsed metadata:)

Triggered when the metadata has been parsed and buffered



Learn about the information contained in the <a href="https://sdk.jwplayer.com/ios/v4/reference/Classes/JWDateRangeMetadata.html" target="_blank"><code>JWDateRangeMetadata</code></a> class</a>.

<br />




## Related

By listening to related methods, you can be informed about the following types of events:

  • A related (Recommendations) playlist has been loaded by the player.

  • The next item has been loaded and is ready for playback

  • A related item has begun playing.

If you are handling these events with the intent to create your own user interface, call the `play(relatedContent:)` in the `JWPlayer` object after a specific related item has been chosen for playback.



When using the `JWPlayerView`, your must supply your own delegate to the `JWPlayer` object.

<br />

### jwplayer(\_:loadedNextUpItem:)

Occurs when the next up item has been loaded

As an argument, it supplies a description of the item.



Learn about the information contained in the <a href="https://sdk.jwplayer.com/ios/v4/reference/Classes/JWCue.html" target="_blank"><code>JWCue</code></a> class.

<br /><br />

### jwplayer(\_:loadedRelatedPlaylist:)

Occurs when the playlist of related content is loaded

As an argument, it supplies the playlist.



Learn about the information contained in the <a href="https://sdk.jwplayer.com/ios/v4/reference/Classes/JWPlayerItem.html" target="_blank"><code>JWPlayerItem</code></a> class.

<br /><br />

### jwplayer(\_:relatedItemBeganPlaying:atIndex:withMethod:)

Occurs when a related item has begun playing

As an argument, it supplies the index of the item in the playlist and what method was used to play the item.



Learn about the information contained in the <a href="https://sdk.jwplayer.com/ios/v4/reference/Classes/JWPlayerItem.html" target="_blank"><code>JWPlayerItem</code></a> class.

<br />

<!-- Removes the automatic page-to-page navigation at the bottom of the page -->

<style> .rm-Pagination { display: none; } </style>