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
<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
datazoom_context = datazoom.createContext(vjs_player);
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/video.js/dist/video-js.min.css">
<!-- THE VIDEO.JS CDN -->
<script src="https://unpkg.com/video.js/dist/video.min.js"></script>
<!-- THE DATAZOOM BEACON SCRIPT -->
<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
</head>
<body>
<div>
<div style="position:relative;width:640px;height:360px">
<video id="video" class="video-js vjs-16-9 vjs-big-play-centered" controls></video>
</div>
<button id="create">Create</button>
</div>
<script>
var vjs_player;
var datazoom_context;
var media_element = document.getElementById("video");
document.getElementById("create").onclick = function () {
var url =
"https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8"
var type = "application/x-mpegURL"
// Create a MediaPlayer and initialize it.
vjs_player = videojs("video", {}, function () {
// Activates data collection
datazoom_context = datazoom.createContext(vjs_player);
vjs_player.src({
src: url,
type: type
});
});
};
</script>
</body>
</html>
Stop Data Collection
destroy() method of the Datazoom context object as in the following example:if (vjs_player) {
vjs_player.dispose();
vjs_player = null;
}
if (datazoom_context) {
datazoom_context.destroy();
datazoom_context = null;
}
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
Player
Attributes
CMCD
User
Fluxdata
Metrics measuring changing parameters over time
-
Bandwidth
-
Buffer Duration
-
Buffer Duration - Content
-
Buffer Length
-
Content Session Start Timestamp
-
Current Audio Track
-
Current Subtitles
-
Number of Content Plays
-
Number of Content Requests
-
Number of Errors
-
Number of Errors - Content
-
Pause Duration
-
Pause Duration - Content
-
Playback Duration
-
Playback Duration - Content
-
Playback Duration - Promo
-
Playback Rate
-
Player State
-
Player Viewable
-
Player Viewable Percent
-
Playhead Position
-
Playhead Position - Program Date Time
-
Rendition Height
-
Rendition Name
-
Rendition Video Bitrate
-
Rendition Width
-
Stall Count
-
Stall Count - Content
-
Stall Duration
-
Stall Duration - Content
-
Time Since Content Request
-
Time Since Content Started
-
Time Since Last Buffer Start
-
Time Since Last Buffer Start - Content
-
Time Since Last Heartbeat
-
Time Since Last Milestone - Content
-
Time Since Last Pause
-
Time Since Last Rendition Change
-
Time Since Last Seek Start
-
Time Since Last Stall Start
-
Time Since Last Stall Start - Content
- Volume

