Application collectors
JW Media Player
v2.29.0 • For the Javascript Collector
The JW 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 JW Player plugin into your web application with the following snippet: Insert this line into your HTML Replace the This inserts Datazoom's data collection SDK into the page. Insert your JW Player license into the page. Every customer will have their own license for JW player. This is the standard option for customers who only need to collect data from the video player and are not concerned with joining player events with CDN logs or sending CMCD data to a CDN. To activate data collection for a JW Player instance, create a Datazoom context which references the player instance with the following snippet: For example: This option is necessary if you are joining Player & CDN Log data together or want to send CMCD data to a CDN. In this option, Datazoom will handle instantiation of the player with the necessary hooks required to insert parameters like Content Session ID & Request ID in every media request the player makes. A JW Player instance can be created with Datazoom data collection activated, using the following snippet: By creating a player instance through the datazoom.createContextAndPlayer() method, it enables Datazoom to collect more player information to assist QoE monitoring and distributed tracing. For example: JW player supports various alternative formats to configure the media contents for playback, the following are common examples supported by the Datazoom collector. Without using playlist: With playlist: With playlist and playlist sources: 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 JW Player Collector integration by providing NPM (Node Package Manager) support. Please see installation details here. JWPlayer API Doc: https://developer.jwplayer.com/jw-player/docs/javascript-api-reference/ Plugin Integration
<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
CONFIG_ID value with Collector configuration id.<script src="http://jwpsrv.com/library/<your_licensed_player.js>"></script>
Option 1: Activate Data Collection for an Existing JW Player Instance
datazoom_context = datazoom.createContext(jw_player);
<html>
<head>
<!-- THE JW PLAYER LICENSE SCRIPT -->
<script src='https://content.jwplatform.com/libraries/JW_LICENSE.js'></script>
<!-- THE DATAZOOM BEACON SCRIPT -->
<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
</head>
<body>
<!-- THE VIDEO PLAYER -->
<div class="vid-container">
<div id="jw-player">
</div>
</div>
<script>
var jw_player;
var datazoom_context;
var config = {
file: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
image: "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Big_Buck_Bunny_thumbnail_vlc.png/320px-Big_Buck_Bunny_thumbnail_vlc.png",
title: "BigBuckBunny-mp4® Product Video",
height: 360,
width: 640
};
// Create a Player instance
jw_player = jwplayer("jw-player").setup(config);
// Activates data collection
datazoom_context = datazoom.createContext(jw_player);
</script>
</body>
</html>
Option 2: Have Datazoom Create a JW Player with Data Collection Activated
datazoom.createContextAndPlayer(container, config).then(
function(context) {
jw_player = context.getPlayer();
datazoom_context = context;
}
);
<html>
<head>
<!-- THE JW PLAYER LICENSE SCRIPT -->
<script src='https://content.jwplatform.com/libraries/JW_LICENSE.js'></script>
<!-- THE DATAZOOM BEACON SCRIPT -->
<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
</head>
<body>
<!-- THE VIDEO PLAYER -->
<div class="vid-container">
<div id="jw-player">
</div>
</div>
<script>
var jw_player;
var datazoom_context;
var config = {
file: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
image: "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Big_Buck_Bunny_thumbnail_vlc.png/320px-Big_Buck_Bunny_thumbnail_vlc.png",
title: "BigBuckBunny-mp4® Product Video",
height: 360,
width: 640
};
// Activate data collection and create a player instance
datazoom.createContextAndPlayer("jw-player", config).then(
function(context) {
jw_player = context.getPlayer();
datazoom_context = context;
}
);
</script>
</body>
</html>
var config = {
file: "https://demo.datazoomlabs.com/vod/example.m3u8",
title: "Football Video",
description: "JW Player Test",
mediaid: "My Content ID",
width: 640,
height: 360,
autostart: "false"
};
var config = {
playlist: [{
file: "https://demo.datazoomlabs.com/vod/example.m3u8",
title: "Football Video",
description: "JW Player Test",
mediaid: "My Content ID"
}],
width: 640,
height: 360,
autostart: "false"
};
var config = {
playlist: [{
title: "Football Video",
description: "JW Player Test",
mediaid: "My Content ID",
sources: [{
file: "https://demo.datazoomlabs.com/vod/example.m3u8"
}]
}],
width: 640,
height: 360,
autostart: "false"
};
Stop Data Collection
destroy() method of the Datazoom context object as in the following example:if (jw_player) {
jw_player.remove();
jw_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 JW 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
-
Cast Transfer
-
Error
-
Exit Fullscreen
-
Fullscreen
-
Heartbeat
-
Media Loaded
-
Media Object Request
-
Media Request
-
Milestone
-
Mute
-
Pause
-
Playback Complete
-
Playback Start
-
Player Ready
-
Playing
-
Qualified View
-
Quality Change Request
-
Rendition Change
-
Resize
-
Resume
-
Seek End
-
Seek Start
-
Stall End
-
Stall Start
-
Stop
-
Subtitle Change
-
Unmute
- Volume Change
Metadata
Player
Attributes
User
Fluxdata
Metrics measuring changing parameters over time
-
Bandwidth
-
Buffer Duration
-
Buffer Duration - Content
-
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 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

