Skip to main content

Youbora Plugin

MobileWebTV Platforms
iOS logoAndroid logoResponsive Web logoWebTV logoRoku logoTvOS logoAndroidTV logo

DIVA Youbora Plugin​

The DIVA Youbora Plugin is an out-of-the-box implementation of a Media Analytics listener which is able to receive events from Diva and directly send them to Youbora.

This plugin is implemented for iOS, tvOS, Android and Web and is used in all our Integration Demo projects as well as in the DIVA Chromecast Receiver app.

The main parameters of this plugin are:

  • CDN Name: A string identifying which CDN solution is used by the project
  • customTagGenerator: A function used by the plugin to calculate Custom TAGs dynamically. Every time the VideoMetadata gets updated and receives a parameter, the function is called.
  • player version: the version of the diva player used to provide additional informations
  • player name: the name of the player used to provide additional informations
  • username: the name of the user to send the data to the correct account
  • account code: the code to access youbora
  • customDimentionsGenerator: A function used by the plugin to calculate Custom Dimensions dynamically. Every time the VideoMetadata gets updated and receives a parameter, the function is called.

Youbora documentation for more information.

// Set plugin parameters
const youboraConfig = {
cdnName: 'AKAMAI',
playerVersion: YOUBORA_PLAYER_VERSION || '',
playerName: 'diva',
userName: YOUBORA_USERNAME || '',
accountCode: YOUBORA_ACCOUNT_CODE || '',
customDimentionsGenerator: (videoMetadata) => [
videoMetadata.videoId,
videoMetadata.title || '',
videoMetadata.assetState || '',
videoMetadata.eventId || '',
'WebTV',
videoMetadata?.behaviour?.spoilerMode || '',
],
customTagGenerator: (videoMetadata) => ({
assetState: videoMetadata.assetState || '',
eventId: videoMetadata.eventId || '',
is24_7: `${videoMetadata.assetState === 'live' && videoMetadata.dvrType === 'none'}`,
is360: `${!!videoMetadata.stereoMode && videoMetadata.stereoMode !== 'none'}`,
platform: 'WebTV',
spoilerMode: videoMetadata.behaviour?.spoilerMode || '',
videoId: videoMetadata.videoId || '',
videoTitle: videoMetadata.title || '',
}),
}

mediaAnalyticPlugin = new YouboraPlugin()
mediaAnalyticPlugin.init(convivaConfig)
window.addEventListener("beforeunload", (e) => {
mediaAnalyticPlugin.detachPlugin();
})

// Start Diva
const {
element: divaElement,
api: divaAPI
} = new Diva('.diva-player-container', {
// ...
onMediaAnalyticEvent: mediaAnalyticPlugin.handleEvent
})

Known Issues​

Rendition

The player does not report on rendition. This parameter is so set manually but on some device could not be able to report this information.

Responsive Web logoWebTV logo
Error Retry

In case of failed retry from video error, Youbora could emit 'start' and 'joinTime' events before the 'error' one.

Responsive Web logoWebTV logo
Playhead hardcoded value

For 'stop' event 'playhead' metric is hardcoded inside SDK with value '-1'.

Roku logo
DAI events

For DAI events, ad related data needs to be defined for correct workflow. Youbora SDK has some internal ads convertion logic, which requires some ads related data.

Roku logo
SDK internal fixes
  • After preroll, there is a delay between Init event and real video playback start, which causes joinTime error
  • 'error: playhead not sent' is tracked with DRM error
  • Session is closed after video error at runtime
  • DAI stream – session is closed after ad break ends
Roku logo