---
updatedAt: 2026-07-27T10:00:37.000Z
agentTools:
  projectIndex: https://developers.dailymotion.com/v0/llms.txt
---

# Listen to events (iOS SDK)

Work with events to capture user interactions with the Player and trigger custom actions.

<br />

To listen to [events](https://developers.dailymotion.com/v0/reference/ios-sdk-player-events) triggered by the Player, you need to implement the following delegate protocols: 

* `DMPlayerDelegate` 
* `DMVideoDelegate` 
* `DMAdDelegate` 

## Recommended: Pass delegates during Player creation

Pass the delegate protocols in the `createPlayer` method:

```swift
Dailymotion.createPlayer(playerId: "PLAYER_ID",playerDelegate: self, videoDelegate: self, adDelegate: self , completion: { [weak self] (dmPlayer, error) in
      // Create Player Done
})
```

## Alternative: Assign delegates after Player creation

Pass the delegate protocols after Player creation, to the created `DMPlayerView` instance:

```swift
Dailymotion.createPlayer(playerId: "PLAYER_ID", completion: { [weak self] (dmPlayer, error) in
      // Create Player Done
      dmPlayer?.playerDelegate = self
      dmPlayer?.videoDelegate = self
      dmPlayer?.adDelegate = self
})
```

> 👍 Best practice
>
> To ensure all events are caught by your delegates, we recommend using the first approach with passing the delegates in the `createPlayer()` method.

<Callout icon="➡️" theme="default">
  ### Learn more

  Find all available events in the [iOS SDK Reference](https://developers.dailymotion.com/v0/reference/ios-sdk-player-events).
</Callout>

<br />