The SDK reports events and asks for ad settings through delegate objects. You set one global delegate on Storyteller.sharedInstance, and you can set a delegate on each view. Every callback is optional. For setup steps, see Handle delegates and callbacks.
The same three, plus userNavigatedToApp (four total)
11.1.0
The same four, plus getBottomBannerAdConfig, categoryFollowActionTaken, onPlayerPresented and onPlayerDismissed (eight total)
Assigning a new delegate replaces the callbacks supported by that SDK version.
The getAdConfig TypeScript member was required in 10.0.0 and became optional
in 10.1.0.
Called when a user taps the link share button in the Story player or the Clips player. Implement it to replace the browser share sheet.
Parameter
Type
Description
text
string
Share text. For a Story, the share text of a poll or quiz Page, and an empty string on other Pages. For a Clip, the Clip description, the same value as title
title
string
Share title. For a Story, the Story title. For a Clip, the Clip description
url
string
The link to share
The player pauses while the share runs. What happens next depends on the callback:
Promise resolves: the SDK records the shareSuccess event and resumes playback
Promise rejects: the SDK resumes playback. It records no shareSuccess event and doesn't call navigator.share
Missing, throws, or returns no promise: the SDK calls navigator.share instead
The share button appears only in browsers that support navigator.share. Story Pages set up to share their image or video file download it and don't call this callback.
Since: 10.0.0. Since 10.4.6, the SDK falls back to navigator.share
Called before an ad request when Storyteller serves ads from your app (Google Ad Manager). In any other ad setup, the SDK doesn't call it. For other ad servers, ask your Storyteller contact.
Google Ad Manager ad unit, in the form /[NETWORK_CODE]/[UNIT_CODE]. A configuration without slot is not valid
customTargeting
AdTargeting
No
Key-value pairs for the ad request. Values are strings or arrays of strings
publisherProvidedId
string or null
No
Publisher Provided ID (PPID). The SDK trims whitespace and omits an empty value
type
'doubleclick'
No
Ad server type
The SDK adds its default targeting keys and lets your customTargeting values override them. When enableAdTracking is false, the SDK omits its default keys and publisherProvidedId, and still sends your customTargeting.
AdConfig and AdTargeting are not exported by name. The declared AdConfig union also includes { type: 'custom'; remoteUrl: string }, which the SDK uses for Storyteller first-party ads. The SDK ignores that shape when your delegate returns it.
Since: 10.0.0 moved the callback to the global delegate. publisherProvidedId was added in 10.13.6
Called when a Clip in the Clips player can show a bottom banner. Return the Google Ad Manager banner unit and the sizes it accepts, or null to show no banner.
Returns: a BottomBannerAdConfig with a slot and a size, or null. Return it synchronously. The SDK requests only the sizes that fit the player. When the configuration isn't valid or the callback throws, the SDK shows no banner
The banner shows only when all four of these are in place:
Storyteller sets your tenant to serve ads from your app (Google Ad Manager), as for getAdConfig, and turns on showBottomBannerAd for the app or collection. Ask your Storyteller contact.
The Clips view's configuration sets adConfiguration.bottomBannerEnabled to true. Players that the SDK creates for openCollection, openClipByExternalId, or openDeepLink without a matching view on the page never show the banner.
This callback returns a valid configuration. It needs a slot and a size. If you set type, it must be 'doubleclick'.
Your page loads Google Publisher Tag (GPT) and calls googletag.setConfig({ disableInitialLoad: true }).
The SDK calls this callback only when the first two hold.
When enableAdTracking is false, the banner request sends no custom targeting at all: neither the SDK's default keys nor your customTargeting. The bottom banner guide covers the GPT setup, the supported players, and the layout limits.
Called when a user taps an in-app action on a Story Page or a Clip. Implement it to route the URL inside your application. Without this callback, in-app actions open like regular URLs.
Called after a user follows or unfollows a category with the follow button in the Clips player, once the SDK has stored the change. Use it to update your own list of followed categories. The SDK calls it only when your tenant uses app-managed following, and never with Storyteller-managed following.
Called when a Story or Clips player opens over your page, as isPresentingContent turns true. Use it to pause your page's own media, for example.
The SDK doesn't call it again while an action in the player replaces the content, or while a Category screen opens inside the Clips player
When an open method or openDeepLink opens content in a different player, the SDK closes the open player first. You get onPlayerDismissed, then onPlayerPresented
StorytellerClipsPlayerView and StorytellerEmbeddedClipsPlayerView don't call it
The SDK catches and logs an error that the callback throws.
Called when the last open Story or Clips player closes, as isPresentingContent turns false. Use it to resume your page's own media, for example.
Every way of closing a player calls it once, including dismissPlayer and an open method or openDeepLink call that opens content in a different player. The SDK catches and logs an error that the callback throws.
The view delegate has its own onPlayerDismissed, which the SDK calls only for a player that the view opened.
Called each time the view starts loading its content. The first load starts inside the constructor, before you can assign a delegate, so your delegate never receives that first call. Show your loading state before you create the view.
Later calls happen after a source change (categories, collection, clipId, or externalId), on reloadData, and when a Clips row or grid reloads after its player closes. That reload happens only when the collection's settings from Storyteller order watched Clips and reload the view on exit, and the user has watched a Clip.
true when the request succeeded. false when it failed or returned no Stories or Clips
error
Error or null
null on success. On failure, the request error. When the failure is not an Error, the SDK passes an Error with the message Network Error
dataCount
number
Stories views: the number of Stories loaded. Clips views: the number of Clips in the first page. Single-Clip players: 1. 0 on failure
Later Clips pages load as users reach the end of the content, and they do not call this callback. See Clips paging.
An automatic refresh that finds new content calls this callback without calling onDataLoadStarted first. A refresh that finds the same content calls neither.
In a Clips player with the For You and Following tabs, this callback and onDataLoadStarted report only the For You load. Following loads, including failed ones, don't call them.
Called when the Story or Clips player that the view opened is dismissed. For a StorytellerClipsPlayerView, it is also called when dismissPlayer closes the view. A tap on the Clips player top-level back button calls onTopLevelBackTapped instead.
Called once each time a user activates a Story or Clip tile in a row or grid by mouse, touch, or keyboard, before the player opens. A click with a modifier key, such as Ctrl-click, opens the tile in a new tab or window and doesn't call it.
The tapped Story or Clip, its one-based tileIndex, its categories, and its CMS metadata
To handle taps yourself, set the theme property lists.enablePlayerOpen to false. The SDK then opens nothing, and every click calls onTileTapped, including modified clicks. The SDK catches and logs an error that the callback throws.
The delegate of StorytellerClipsPlayerView and StorytellerEmbeddedClipsPlayerView. It supports the IListViewDelegate callbacks. A Clips player has no tiles, so it never calls onTileTapped.
Called when a user taps the top-level back button. The button shows only when topLevelBackButtonEnabled is true. Without this callback, the SDK calls window.history.back().
{"slug": "reference-callbacks", "page_title": "Callbacks", "page_url": "reference/callbacks/", "canonical_url": "/web/reference/callbacks/", "markdown": "# Callbacks\n\nThe SDK reports events and asks for ad settings through delegate objects. You set one global delegate on `Storyteller.sharedInstance`, and you can set a delegate on each view. Every callback is optional. For setup steps, see [Handle delegates and callbacks](../delegates/index.md).\n\n## Delegate interfaces\n\nThe SDK defines three delegate interfaces:\n\n| Interface | Set it on | Callbacks |\n| --- | --- | --- |\n| [`IStorytellerDelegate`](#istorytellerdelegate) | [`Storyteller.sharedInstance.delegate`](storyteller.md#delegate) | `onUserActivityOccurred`, `onShareButtonTapped`, `getAdConfig`, `getBottomBannerAdConfig`, `userNavigatedToApp`, `categoryFollowActionTaken`, `onPlayerPresented`, `onPlayerDismissed` |\n| [`IListViewDelegate`](#ilistviewdelegate) | The `delegate` of a Stories or Clips row or grid | `onDataLoadStarted`, `onDataLoadComplete`, `onPlayerDismissed`, `onTileTapped` |\n| [`IStorytellerClipsPlayerDelegate`](#istorytellerclipsplayerdelegate) | The `delegate` of a `StorytellerClipsPlayerView` or `StorytellerEmbeddedClipsPlayerView` | The `IListViewDelegate` callbacks, plus `onTopLevelBackTapped` |\n\nAssigning a delegate object replaces the previous one, so include every callback that you need in each assignment.\n\n## `IStorytellerDelegate`\n\n### Callback availability {#global-callback-availability}\n\n| Version | Global callbacks |\n| --- | --- |\n| 10.0.0\u201310.5.x | Three: `onUserActivityOccurred`, `onShareButtonTapped`, `getAdConfig` |\n| 10.6.0\u201311.0.2 | The same three, plus `userNavigatedToApp` (four total) |\n| 11.1.0 | The same four, plus `getBottomBannerAdConfig`, `categoryFollowActionTaken`, `onPlayerPresented` and `onPlayerDismissed` (eight total) |\n\nAssigning a new delegate replaces the callbacks supported by that SDK version.\nThe `getAdConfig` TypeScript member was required in 10.0.0 and became optional\nin 10.1.0.\n\n```typescript\ninterface IStorytellerDelegate {\n onUserActivityOccurred?: (\n type: ActivityType,\n data: UserActivityData\n ) => void;\n onShareButtonTapped?: (\n text: string,\n title: string,\n url: string\n ) => Promise<void>;\n getAdConfig?: (\n adRequestInfo: StorytellerAdRequestInfo\n ) => AdConfig | null;\n getBottomBannerAdConfig?: (\n adRequestInfo: StorytellerBottomBannerAdRequestInfo\n ) => BottomBannerAdConfig | null;\n userNavigatedToApp?: (url: string) => void;\n categoryFollowActionTaken?: (\n category: StorytellerCategory,\n isFollowing: boolean\n ) => void;\n onPlayerPresented?: () => void;\n onPlayerDismissed?: () => void;\n}\n```\n\nThe global delegate handles events from every Story player and Clips player on the page.\n\n```typescript\nStoryteller.sharedInstance.delegate = {\n onUserActivityOccurred: (type, data) => {\n console.log(type, data.context);\n },\n};\n```\n\n- **Guide**: [Handle global callbacks](../StorytellerDelegate.md#methods)\n\n### `onUserActivityOccurred`\n\n```typescript\nonUserActivityOccurred?: (type: ActivityType, data: UserActivityData) => void\n```\n\nCalled for each analytics event. The SDK ignores the return value.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `type` | [`ActivityType`](types.md#activitytype) | The event name, such as `openedStory` |\n| `data` | [`UserActivityData`](types.md#useractivitydata) | The event properties. Each event page lists the properties that it sets |\n\nThe [privacy options](storyteller.md#eventtrackingoptions) control the callback:\n\n- The callback runs only when `enableUserActivityTracking` is `true`\n- Ad events reach the callback only when `enableAdTracking` is `true`\n- When `enableFullVideoAnalytics` is `false`, the SDK sets `storyId`, `storyTitle`, `storyDisplayTitle`, `pageId`, `pageTitle`, `clipId`, and `clipTitle` to `null`\n\n`data.context` holds the view's [`configuration.context`](../Analytics.md#context), unless that value is `undefined`. Assign the delegate before `initialize` to receive the [`sdkInitialized` event](../Analytics.md#sdk-initialization).\n\n- **Since**: 10.0.0 moved the callback to the global delegate\n- **Guides**: [Integrate analytics](../Analytics.md#event-types), [Story events](../analytics/StoryEvents.md), [Clip events](../analytics/ClipEvents.md), [Ad events](../analytics/AdEvents.md)\n\n### `onShareButtonTapped`\n\n```typescript\nonShareButtonTapped?: (\n text: string,\n title: string,\n url: string\n) => Promise<void>\n```\n\nCalled when a user taps the link share button in the Story player or the Clips player. Implement it to replace the browser share sheet.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `text` | `string` | Share text. For a Story, the share text of a poll or quiz Page, and an empty string on other Pages. For a Clip, the Clip description, the same value as `title` |\n| `title` | `string` | Share title. For a Story, the Story title. For a Clip, the Clip description |\n| `url` | `string` | The link to share |\n\nThe player pauses while the share runs. What happens next depends on the callback:\n\n- **Promise resolves**: the SDK records the `shareSuccess` event and resumes playback\n- **Promise rejects**: the SDK resumes playback. It records no `shareSuccess` event and doesn't call `navigator.share`\n- **Missing, throws, or returns no promise**: the SDK calls `navigator.share` instead\n\nThe share button appears only in browsers that support `navigator.share`. Story Pages set up to share their image or video file download it and don't call this callback.\n\n- **Since**: 10.0.0. Since 10.4.6, the SDK falls back to `navigator.share`\n- **Guide**: [Handle global callbacks](../StorytellerDelegate.md#methods)\n\n### `getAdConfig`\n\n```typescript\ngetAdConfig?: (adRequestInfo: StorytellerAdRequestInfo) => AdConfig | null\n```\n\nCalled before an ad request when Storyteller serves ads from your app (Google Ad Manager). In any other ad setup, the SDK doesn't call it. For other ad servers, ask your Storyteller contact.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `adRequestInfo` | [`StorytellerAdRequestInfo`](types.md#storytelleradrequestinfo) | The Story or Clip context of the ad slot |\n\nReturn an ad configuration, or `null` to send no ad request. The SDK uses this shape of the declared `AdConfig` union:\n\n```typescript\ninterface IntegratingAppAdConfig {\n type?: 'doubleclick';\n slot: string;\n customTargeting?: AdTargeting;\n publisherProvidedId?: string | null;\n}\n\ninterface AdTargeting {\n [index: string]: string | string[];\n}\n```\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `slot` | `string` | Yes | Google Ad Manager ad unit, in the form `/[NETWORK_CODE]/[UNIT_CODE]`. A configuration without `slot` is not valid |\n| `customTargeting` | `AdTargeting` | No | Key-value pairs for the ad request. Values are strings or arrays of strings |\n| `publisherProvidedId` | `string` or `null` | No | Publisher Provided ID (PPID). The SDK trims whitespace and omits an empty value |\n| `type` | `'doubleclick'` | No | Ad server type |\n\nThe SDK adds its default targeting keys and lets your `customTargeting` values override them. When `enableAdTracking` is `false`, the SDK omits its default keys and `publisherProvidedId`, and still sends your `customTargeting`.\n\n`AdConfig` and `AdTargeting` are not exported by name. The declared `AdConfig` union also includes `{ type: 'custom'; remoteUrl: string }`, which the SDK uses for Storyteller first-party ads. The SDK ignores that shape when your delegate returns it.\n\n- **Since**: 10.0.0 moved the callback to the global delegate. `publisherProvidedId` was added in 10.13.6\n- **Guides**: [Google Ad Manager integration](../Ads.md#storyteller-ad-manager-integration), [Default Targeting](../Ads.md#default-targeting), [AdRequestInfo](../Ads.md#adrequestinfo)\n\n### `getBottomBannerAdConfig`\n\n```typescript\ngetBottomBannerAdConfig?: (\n adRequestInfo: StorytellerBottomBannerAdRequestInfo\n) => BottomBannerAdConfig | null\n```\n\nCalled when a Clip in the Clips player can show a [bottom banner](../Ads.md#clips-bottom-banners). Return the Google Ad Manager banner unit and the sizes it accepts, or `null` to show no banner.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `adRequestInfo` | [`StorytellerBottomBannerAdRequestInfo`](types.md#storytellerbottombanneradrequestinfo) | The collection and the categories of the Clip |\n\n- **Returns**: a [`BottomBannerAdConfig`](types.md#bottombanneradconfig) with a `slot` and a `size`, or `null`. Return it synchronously. The SDK requests only the sizes that fit the player. When the configuration isn't valid or the callback throws, the SDK shows no banner\n\nThe banner shows only when all four of these are in place:\n\n1. Storyteller sets your tenant to serve ads from your app (Google Ad Manager), as for [`getAdConfig`](#getadconfig), and turns on `showBottomBannerAd` for the app or collection. Ask your Storyteller contact.\n2. The Clips view's configuration sets [`adConfiguration.bottomBannerEnabled`](views.md#clips-ad-configuration) to `true`. Players that the SDK creates for `openCollection`, `openClipByExternalId`, or `openDeepLink` without a matching view on the page never show the banner.\n3. This callback returns a valid configuration. It needs a `slot` and a `size`. If you set `type`, it must be `'doubleclick'`.\n4. Your page loads Google Publisher Tag (GPT) and calls `googletag.setConfig({ disableInitialLoad: true })`.\n\nThe SDK calls this callback only when the first two hold.\n\nWhen `enableAdTracking` is `false`, the banner request sends no custom targeting at all: neither the SDK's default keys nor your `customTargeting`. The [bottom banner guide](../Ads.md#clips-bottom-banners) covers the GPT setup, the supported players, and the layout limits.\n\n- **Since**: 11.1.0\n- **Guides**: [Clips bottom banners](../Ads.md#clips-bottom-banners), [Handle global callbacks](../StorytellerDelegate.md#getbottombanneradconfig)\n\n### `userNavigatedToApp`\n\n```typescript\nuserNavigatedToApp?: (url: string) => void\n```\n\nCalled when a user taps an in-app action on a Story Page or a Clip. Implement it to route the URL inside your application. Without this callback, in-app actions open like regular URLs.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `url` | `string` | The action URL set in the Storyteller CMS |\n\n- **Since**: 10.6.0\n- **Guide**: [Handle global callbacks](../StorytellerDelegate.md#methods)\n\n### `categoryFollowActionTaken`\n\n```typescript\ncategoryFollowActionTaken?: (\n category: StorytellerCategory,\n isFollowing: boolean\n) => void\n```\n\nCalled after a user follows or unfollows a category with the follow button in the Clips player, once the SDK has stored the change. Use it to update your own list of followed categories. The SDK calls it only when your tenant uses app-managed following, and never with Storyteller-managed following.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `category` | [`StorytellerCategory`](types.md#storytellercategory) | The category that the user followed or unfollowed |\n| `isFollowing` | `boolean` | `true` after a follow, `false` after an unfollow |\n\n- **Since**: 11.1.0\n- **Guides**: [Handle global callbacks](../StorytellerDelegate.md#categoryfollowactiontaken), [Follow categories in the Clips player](../Users.md#follow-categories-in-the-clips-player)\n\n### `onPlayerPresented` {#storyteller-delegate-onplayerpresented}\n\n```typescript\nonPlayerPresented?: () => void\n```\n\nCalled when a Story or Clips player opens over your page, as [`isPresentingContent`](storyteller.md#ispresentingcontent) turns `true`. Use it to pause your page's own media, for example.\n\n- The SDK doesn't call it again while an action in the player replaces the content, or while a Category screen opens inside the Clips player\n- When an [open method](storyteller.md#open-methods) or `openDeepLink` opens content in a different player, the SDK closes the open player first. You get `onPlayerDismissed`, then `onPlayerPresented`\n- `StorytellerClipsPlayerView` and `StorytellerEmbeddedClipsPlayerView` don't call it\n\nThe SDK catches and logs an error that the callback throws.\n\n- **Since**: 11.1.0\n- **Guide**: [Handle global callbacks](../StorytellerDelegate.md#onplayerpresented)\n\n### `onPlayerDismissed` {#storyteller-delegate-onplayerdismissed}\n\n```typescript\nonPlayerDismissed?: () => void\n```\n\nCalled when the last open Story or Clips player closes, as [`isPresentingContent`](storyteller.md#ispresentingcontent) turns `false`. Use it to resume your page's own media, for example.\n\nEvery way of closing a player calls it once, including [`dismissPlayer`](storyteller.md#dismissplayer) and an open method or `openDeepLink` call that opens content in a different player. The SDK catches and logs an error that the callback throws.\n\nThe view delegate has its own [`onPlayerDismissed`](#onplayerdismissed), which the SDK calls only for a player that the view opened.\n\n- **Since**: 11.1.0\n- **Guide**: [Handle global callbacks](../StorytellerDelegate.md#onplayerdismissed)\n\n## `IListViewDelegate`\n\n```typescript\ninterface IListViewDelegate {\n onDataLoadStarted?: () => void;\n onDataLoadComplete?: (\n success: boolean,\n error: Error | null,\n dataCount: number\n ) => void;\n onPlayerDismissed?: () => void;\n onTileTapped?: (tile: StorytellerTileData) => void;\n}\n```\n\nA view delegate handles events from one view. The SDK fills callbacks that you leave out with no-op functions.\n\n```typescript\nconst storyRow = new Storyteller.StorytellerStoriesRowView('stories-row-id');\n\nstoryRow.delegate = {\n onDataLoadStarted: () => console.log('Loading Stories'),\n onDataLoadComplete: (success, error, dataCount) => {\n console.log(success, error, dataCount);\n },\n};\n```\n\n- **Since**: 10.0.0 renamed `onStoriesDataLoadStarted` to `onDataLoadStarted` and `onStoriesDataLoadComplete` to `onDataLoadComplete`\n- **Guide**: [Handle view callbacks](../StorytellerListViewDelegate.md#delegate-methods)\n\n### `onDataLoadStarted`\n\n```typescript\nonDataLoadStarted?: () => void\n```\n\nCalled each time the view starts loading its content. The first load starts inside the constructor, before you can assign a delegate, so your delegate never receives that first call. Show your loading state before you create the view.\n\nLater calls happen after a source change (`categories`, `collection`, `clipId`, or `externalId`), on [`reloadData`](views.md#reloaddata), and when a Clips row or grid reloads after its player closes. That reload happens only when the collection's settings from Storyteller order watched Clips and reload the view on exit, and the user has watched a Clip.\n\n### `onDataLoadComplete`\n\n```typescript\nonDataLoadComplete?: (\n success: boolean,\n error: Error | null,\n dataCount: number\n) => void\n```\n\nCalled when the content request finishes.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `success` | `boolean` | `true` when the request succeeded. `false` when it failed or returned no Stories or Clips |\n| `error` | `Error` or `null` | `null` on success. On failure, the request error. When the failure is not an `Error`, the SDK passes an `Error` with the message `Network Error` |\n| `dataCount` | `number` | Stories views: the number of Stories loaded. Clips views: the number of Clips in the first page. Single-Clip players: `1`. `0` on failure |\n\nLater Clips pages load as users reach the end of the content, and they do not call this callback. See [Clips paging](../StorytellerListView.md#clips-paging).\n\nAn [automatic refresh](../StorytellerListView.md#automatic-refresh) that finds new content calls this callback without calling `onDataLoadStarted` first. A refresh that finds the same content calls neither.\n\nIn a Clips player with the [For You and Following tabs](../Users.md#for-you-and-following-tabs), this callback and `onDataLoadStarted` report only the For You load. Following loads, including failed ones, don't call them.\n\n### `onPlayerDismissed`\n\n```typescript\nonPlayerDismissed?: () => void\n```\n\nCalled when the Story or Clips player that the view opened is dismissed. For a `StorytellerClipsPlayerView`, it is also called when [`dismissPlayer`](storyteller.md#dismissplayer) closes the view. A tap on the Clips player top-level back button calls [`onTopLevelBackTapped`](#ontoplevelbacktapped) instead.\n\n### `onTileTapped`\n\n```typescript\nonTileTapped?: (tile: StorytellerTileData) => void\n```\n\nCalled once each time a user activates a Story or Clip tile in a row or grid by mouse, touch, or keyboard, before the player opens. A click with a modifier key, such as Ctrl-click, opens the tile in a new tab or window and doesn't call it.\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `tile` | [`StorytellerTileData`](types.md#storytellertiledata) | The tapped Story or Clip, its one-based `tileIndex`, its categories, and its CMS `metadata` |\n\nTo handle taps yourself, set the theme property [`lists.enablePlayerOpen`](../Themes.md#lists) to `false`. The SDK then opens nothing, and every click calls `onTileTapped`, including modified clicks. The SDK catches and logs an error that the callback throws.\n\n- **Since**: 11.1.0\n- **Guide**: [Handle taps yourself](../StorytellerListViewDelegate.md#handle-taps-yourself)\n\n## `IStorytellerClipsPlayerDelegate`\n\n```typescript\ninterface IStorytellerClipsPlayerDelegate extends IListViewDelegate {\n onTopLevelBackTapped?: () => void;\n}\n```\n\nThe delegate of `StorytellerClipsPlayerView` and `StorytellerEmbeddedClipsPlayerView`. It supports the [`IListViewDelegate`](#ilistviewdelegate) callbacks. A Clips player has no tiles, so it never calls `onTileTapped`.\n\n### `onTopLevelBackTapped`\n\n```typescript\nonTopLevelBackTapped?: () => void\n```\n\nCalled when a user taps the top-level back button. The button shows only when [`topLevelBackButtonEnabled`](views.md#toplevelbackbuttonenabled) is `true`. Without this callback, the SDK calls `window.history.back()`.\n\n```typescript\nclipPlayer.topLevelBackButtonEnabled = true;\nclipPlayer.delegate = {\n onTopLevelBackTapped: () => {\n window.history.back();\n },\n};\n```\n\n- **Since**: 10.13.6\n- **Guide**: [Handle view callbacks](../StorytellerListViewDelegate.md#delegate-methods)\n", "copy_markdown_include_header": false, "base_path": "", "ai_dir": "ai", "missing_payload_behavior": "empty"}