Datazoom is a high-availability real-time data collection solution. This document summarizes how to integrate the THEOplayer player with the Datazoom platform.
Login to Datazoom here: https://app.datazoom.io
Add a Collector as indicated here: How to add a Collector
Copy the CONFIG ID
to be used in the subsequent steps
Plugin Integration
Datazoom provides plugins for data collection through our Beacon Services. Integrate the THEOplayer 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 THEOplayer
To activate data collection for a THEOplayer instance, create a Datazoom context which references the player instance with the following snippet:
datazoom_context = datazoom.createContext(theo_player);
For example:
<!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="https://cdn.myth.theoplayer.com/60b5ca02-a9e7-42b3-aab8-e008a4dfece4/ui.css"> <!-- THE THEO PLAYER CDN --> <script src="https://cdn.myth.theoplayer.com/60b5ca02-a9e7-42b3-aab8-e008a4dfece4/THEOplayer.js"></script> <!-- THE DATAZOOM BEACON SCRIPT --> <script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script> </head> <body> <div> <div id="video" style="width:50%"> <div class="video-js theoplayer-skin vjs-16-9"></div> </div> </div> <script> var theo_player; var datazoom_context; var url = "https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd"; // Create a Player instance and replace license with your license key. theo_player = new THEOplayer.Player(document.getElementById("video").children[0], { libraryLocation: "https://cdn.myth.theoplayer.com/60b5ca02-a9e7-42b3-aab8-e008a4dfece4/", license: "xxxxx-xxxxxx-xxxxx-xxxxxxx-xxx" }); theo_player.source = { sources: [{ src: url, type: "application/dash+xml" }] }; //Activates data collection datazoom_context = datazoom.createContext(theo_player); </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:
if (theo_player) { theo_player.destroy(); theo_player = null; } if (datazoom_context) { datazoom_context.destroy(); datazoom_context = null; }
References:
THEOplayer API Doc : https://docs.theoplayer.com/getting-started/01-sdks/01-web/00-getting-started.md
To enable CMCD on THEO player requires THEO’s CMCD connector plugin library. Please contact THEO.
CMCD Support
Datazoom provides two discrete settings that control CMCD data collection, one for a specific player event, “Media Object Request”, and one for the corresponding CDN log response.
Player Collector configuration options
Use this option to enable your configured CDN to collect and return CMCD data, contained in the CMCD node of the log line JSON
Off - no CMCD keys are passed
Lite - only the CMCD keys Session ID (sid) and Request ID (rid) are passed to the CDN via query parameter with every “Media Object Request”
Full - the full set of keys specified by the CMCD standard are passed to the CDN via query parameter with every “Media Object Request”
Requires at least the “Lite” setting above
Data Pipe configuration options
Select the CMCD data points you wish to be included in content requests.
Media Object Request - The video player will emit an event called “media_object_request” that will contain the selected CMCD keys below
CMCD keys - Select the CMCD keys you wish to have included with each Media Object Request
Comments
0 comments
Article is closed for comments.