Skip to main content

Callbacks

Before starting​

  • Find which parts of code you can extend with the callbacks in Basic instantiation code.
  • Find in the API article the description of all the fields and functions that the DIVA Player lib and DIVA Back Office Adapter provide.

DIVA Player callbacks(observers) full list​

DIVA Player is responsible for playback and all interactions with playback and UI.

FieldTypeDescription
divaPlayerExitboolean

Called when the user presses the "Back" button on the remote to exit the DIVA Player.

errorDataassocarray

If an error occurs in the DIVA Player, the error data is dispatched through this field.

selectedTextTrackstring

When the user selects a new closed caption track, a callback is dispatched. More info in the API section.

CCModestring

When the user changes the Closed Caption mode, a callback is dispatched. Available values: "Off", "On", "Instant replay", "When mute". More info in the API section.

selectedAudioTrackassocarray

DIVA Player notifies when the user selects a new audio track in the Audio Panel. More info in the API section.

analyticsEventassocarray

DIVA Player provides callback functions to customize the analytic events payload sent to the analytics provider. More info in the Analytics section.

mediaAnalyticsEventassocarray

DIVA Player provides callback functions to send events to the Conviva and Youbora analytics providers. More info in the Media analytics section.

playerPositionEventassocarray

Called when the player position (both relative to the video logical start and Unix timecode) of the main video changes. More info in the Resume Point API section.

playerStateEventstring

Called when the player state of the main video changes. More info in the Resume Point API section.

videoMetadataEventnode

Called when the video metadata of the main video changes. More info in the Resume Point API section.

accessibilityUpdateEventassocarray

Called when the user changes the accessibility option in the DIVA Player. More info in the API section.

onPlaybackSessionboolean

Called when the DIVA playback session changes. More info in the API section.

contentDurationinteger

Content duration in seconds.

recommendationRowItemSelectassocarray

Called when a Recommendation item is selected. More info in the Recommendations / Related section.

onCrewItemSelectionassocarray

This callback is triggered when the user selects any Cast and Crew row item.

DIVA Back Office Adapter callbacks(observers) full list​

The DIVA Back Office Adapter is used to exchange data with DIVA Back Office and provides the ability for DIVA Player to exchange data with DIVA Back Office through it.

FieldTypeDescription
errorassocarray

If an error occurs in the DIVA Back Office Adapter, the error data is dispatched through this field.
More info in the Basic instantiation code (BrightScript) section.

divaLaunchParamsassocarray

Called when the DIVA Back Office Adapter retrieves data required for launching the DIVA Player.
More info in the Configuration section.

dictionaryassocarray

Called when the DIVA Back Office Adapter retrieves dictionary data from the DIVA Back Office.
More info in the Basic instantiation code (BrightScript) section.

videoDataNodenode

More info in the VideoMetaDataMap section.

boAdapterReadyboolean

Called when the DIVA Back Office Adapter gets all the necessary data for launching the DIVA Player. More info in the Configuration section.