Skip to content

Handle delegates and callbacks#

A delegate is an object of callback functions that the SDK calls when something happens. Storyteller has one global delegate, and each view has its own delegate. Every callback is optional.

Delegate types#

What you want to handle TypeScript type Where you set it Guide
Analytics events, share taps, ad requests, and in-app action links from every Story and Clips player IStorytellerDelegate Storyteller.sharedInstance.delegate Handle global callbacks
Loading and player dismissal for one row or grid IListViewDelegate The row or grid's delegate property Handle view callbacks
Loading, dismissal, and the back button for one Clips player view IStorytellerClipsPlayerDelegate The delegate property of a StorytellerClipsPlayerView or StorytellerEmbeddedClipsPlayerView Handle view callbacks

Set the global delegate before you call initialize, so that it receives the sdkInitialized event. Assigning a delegate replaces the previous one: callbacks you leave out of the new object stop being called.

Guides#