JWP's event listeners enable you to listen for player events to occur. Once the event occurs, you can define an appropriate response.

You can listen for events either through the `JWPlayerViewController` or the `JWPlayerView`.

<br />

## JWPlayerViewController

When using the `JWPlayerViewController` to display your content, this class subscribes to all events and is assigned as each delegate.

Use the following steps to listen for events:

  1. Override the <a href="/players/docs/ios-event-listeners-reference" target="_blank">delegate methods</a> and read the needed data.

  2. Call `super()` to inform the `JWPlayerViewController` of the event.

<br />

<br />

## JWPlayerView

The `JWPlayerViewController` does not support this approach.

Attempting to follow these steps using the `JWPlayerViewController` will produce the following results:

  • The assignment will be unsuccessful.

  • A warning will be printed to the console announcing that `JWPlayerViewController` cannot be overridden as a delegate for these events.

<br />

If are using `JWPlayerView`, use the following steps:

  1. Create your own class which conforms to a <a href="/players/docs/ios-event-listeners-reference" target="_blank">specific delegate</a>.

  2. Assign it as the delegate through the `JWPlayer` object.

<br />

<br />

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

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