Delegates

Use delegates when your app needs to react to SDK events, such as content starting to load, the player opening or closing, or the Viewer interacting with buttons your app owns.

Delegates are optional. If you don't need to react to events, you can integrate player sources without them.

Common use cases

  • Track when the player opens and closes
  • Show or hide loading UI based on player readiness
  • Handle custom actions, links, or buttons
  • Trigger app navigation based on Viewer interactions

Interaction links

When a Viewer taps a link on a graphic or button over the video (an Engagement Layer interaction), your app decides who opens it. The SDK can open the link outside the app (the default), open it in the SDK in-app web view, or leave it to your app. On iOS and Android, the return value of onTriggerInteractionLink decides. In React Native, onTriggerInteractionLink only reports the link, and interactionLinkHandling, set in the init options or on each widget, decides. Available on iOS, Android, and React Native: iOS | Android | React Native. Web doesn't have this callback.

How delegates fit in

Delegates don't change what content the SDK loads. They're a communication layer between the SDK and your app.

For entry points that can use delegates, see Player sources. For the broader delivery path, see Content delivery.


Did this page help you?