Application collectors
Video.js Media Player
v2.29.0 • For the Javascript Collector
The Video.js 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
Datazoom provides plugins for data collection through our Beacon Services. Integrate the Video.js plugin into your web application with the following snippet: Insert this JS line into your HTML Replace the This inserts Datazoom's data collection SDK into the page. To activate data collection for a Video.js player instance, create a Datazoom context which references the player instance with the following snippet: For example: If the data collection must be stopped for any reason, for example after the destruction of the corresponding player instance, invoke the We have made it convenient to manage your video.js Collector integration by providing NPM (Node Package Manager) support. Please see installation details here. Video.js Player API Doc : https://docs.videojs.com/ Plugin Integration
1<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>CONFIG_ID value with the collector configuration ID.Activate Data Collection for Video.js
1datazoom_context = datazoom.createContext(vjs_player);1<!DOCTYPE html>2<html lang="en">34<head>5 <link rel="stylesheet" type="text/css" href="https://unpkg.com/video.js/dist/video-js.min.css">6 <!-- THE VIDEO.JS CDN -->7 <script src="https://unpkg.com/video.js/dist/video.min.js"></script>8 <!-- THE DATAZOOM BEACON SCRIPT -->9 <script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>10</head>1112<body>1314 <div>15 <div style="position:relative;width:640px;height:360px">16 <video id="video" class="video-js vjs-16-9 vjs-big-play-centered" controls></video>17 </div>18 <button id="create">Create</button>19 </div>2021 <script>22 var vjs_player;23 var datazoom_context;2425 var media_element = document.getElementById("video");2627 document.getElementById("create").onclick = function () {28 var url =29 "https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8"30 var type = "application/x-mpegURL"31 // Create a MediaPlayer and initialize it.32 vjs_player = videojs("video", {}, function () {33 // Activates data collection34 datazoom_context = datazoom.createContext(vjs_player);35 vjs_player.src({36 src: url,37 type: type38 });39 });40 };41 </script>4243</body>4445</html>Stop Data Collection
destroy() method of the Datazoom context object as in the following example:1if (vjs_player) {2 vjs_player.dispose();3 vjs_player = null;4}56if (datazoom_context) {7 datazoom_context.destroy();8 datazoom_context = null;9}NPM (Node Package Manager)
References:
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 or request header with every “Media Object Request”.
Full - the full set of keys specified by the CMCD standard are passed to the CDN via query parameter or request header with every “Media Object Request”
Bitmovin and JW Player support only 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
Ad Frameworks Extensions
If your Javascript application has a media player with an ad framework, Datazoom’s Javascript Collector with a Video.js Media Player can be extended with the following ad framework extensions.
Supported Features
Supported Data Points
Events
Discrete occurrences driven by user interactions or system actions
-
Audio Track Changed
-
Buffer End
-
Buffer Start
-
Cast End
-
Cast Start
-
Error
-
Exit Fullscreen
-
Fullscreen
-
Heartbeat
-
Media Loaded
-
Media Object Request
-
Media Request
-
Milestone
-
Mute
-
Pause
-
Playback Complete
-
Playback Start
-
Player Ready
-
Playing
-
Qualified View
-
Rendition Change
-
Resize
-
Resume
-
Seek End
-
Seek Start
-
Stall End
-
Stall Start
-
Stop
-
Subtitle Change
-
Unmute
- Volume Change
Metadata
CMCD
Player
Attributes
User
Fluxdata
Metrics measuring changing parameters over time
-
Audio Track
-
Bandwidth
-
Buffer Duration (Content Session)
-
Buffer Length
-
Buffer Start Recency (Content Session)
-
Content Buffer Duration (Content Session)
-
Content Buffer Start Recency (Content Session)
-
Content Error Count (App Session)
-
Content Media Request Count (App Session)
-
Content Media Request Recency (Content Session)
-
Content Milestone Recency (Content Session)
-
Content Pause Duration (Content Session)
-
Content Playback Duration (Content Session)
-
Content Playback Start Count (App Session)
-
Content Playback Start Recency (Content Session)
-
Content Session Start Timestamp
-
Content Stall Count (Content Session)
-
Content Stall Duration (Content Session)
-
Content Stall Start Recency (Content Session)
-
Error Count (App Session)
-
Heartbeat Recency (Content Session)
-
Pause Duration (Content Session)
-
Pause Recency (Content Session)
-
Playback Duration (Content Session)
-
Playback Rate
-
Player State
-
Player Viewable
-
Player Viewable Percent
-
Playhead Position
-
Playhead Position - Program Date Time
-
Promo Playback Duration (Content Session)
-
Rendition Change Recency (Content Session)
-
Rendition Height
-
Rendition Name
-
Rendition Video Bitrate
-
Rendition Width
-
Seek Start Recency (Content Session)
-
Stall Count (Content Session)
-
Stall Duration (Content Session)
-
Stall Start Recency (Content Session)
-
Subtitle Track
- Volume

