Logo

Application collectors

Kaltura Media Player

v2.20.0 • For the Javascript Collector

The Kaltura Media Player Extension is a configuration option for the Javascript Collector by Datazoom that makes the following additional data points automatically collectable in real time.

Integration Instructions

Plugin Integration

Datazoom provides plugins for data collection through our Beacon Services. Integrate the Kaltura Player plugin into your web application with the following snippet:

<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
  • Insert this JS line into your HTML

  • Replace the CONFIG_ID value with the collector configuration ID.

This inserts Datazoom's data collection SDK into the page.

Activate Data Collection for a Kaltura Player

To activate data collection for a Kaltura player instance, create a Datazoom context which references the player instance with the following snippet:

datazoom_context = datazoom.createContext(kalturaPlayer);

for example:

<!DOCTYPE html>
<html lang="en">

<head>
    <script src="https://cdnapisec.kaltura.com/p/XXXXXX/sp/XXXXXX/embedIframeJs/uiconf_id/XXXXXX/partner_id/XXXXXX"></script>
    
    <!-- THE DATAZOOM BEACON SCRIPT -->
    <script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
</head>
 
<body>
 
<div class="vid-container">
         <div id="player" style="width : 100% ;height : 400px">
         </div>
</div>
 
<script>
   var kdp;
   kWidget.embed({
     "targetId": "player",
     "wid": "XXXXXX",
     "uiconf_id": XXXXX,
     "flashvars": {},
     "cache_st": XXXXXXXX,
     "entry_id": "XXXXXX"
  });

 try {
    var kalturaPlayer = KalturaPlayer.setup(config);
    kalturaPlayer.loadMedia({entryId: '0_wifqaipd'});
    datazoom_context = datazoom.createContext(kalturaPlayer);
  } catch (e) {
    console.error(e.message)
  }

</script>
 
</body>
 
</html>

Stop Data Collection

If the data collection must be stopped for any reason, for example after the destruction of the corresponding player instance, invoke the destroy() method of the Datazoom context object as in the following example:

 document.getElementById("destroy").onclick = function() {
        if (kalturaPlayer) {
            kalturaPlayer.destroy();
            kalturaPlayer = null;
        }
        if (datazoom_context) {
            datazoom_context.destroy();
            datazoom_context = null;
        }

NPM (Node Package Manager)

We have made it convenient to manage your Kaltura Collector integration by providing NPM (Node Package Manager) support. Please see installation details here.

References:

Kaltura Player API Doc: https://developer.kaltura.com/player/web/api-web

Ad Frameworks Extensions

If your Javascript application has a media player with an ad framework, Datazoom’s Javascript Collector with a Kaltura Media Player can be extended with the following ad framework extensions.