Application collectors
AWS IVS Media Player
v2.25.0 • For the Javascript Collector
The AWS IVS 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 AWS IVS 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. Include the following tag (for the latest version of the AWS IVS player). To activate data collection for an AWS IVS 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 Amazon IVS Collector integration by providing NPM (Node Package Manager) support. Please see installation details here. Amazon IVS Web Player SDK ReferencePlugin Integration
<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>
CONFIG_ID value with Collector configuration id.<script src="https://player.live-video.net/1.21.0/amazon-ivs-player.min.js"></script>
Activate Data Collection for an AWS IVS Player
datazoom_context = datazoom.createContext(aws_ivs_player);
<!DOCTYPE html>
<html lang="en">
<head>
<!-- THE AWS IVS SCRIPT -->
<script src="https://player.live-video.net/1.16.0/amazon-ivs-player.min.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>
<video id="video" style="width:50%;height:50%" controls></video>
</div>
<script>
var aws_ivs_player;
var datazoom_context;
var url = "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8";
// Create a Player instance
if (IVSPlayer.isPlayerSupported) {
aws_ivs_player = IVSPlayer.create();
aws_ivs_player.attachHTMLVideoElement(document.getElementById("video"));
aws_ivs_player.load(url);
// Activates data collection
datazoom_context = datazoom.createContext(aws_ivs_player);
}
</script>
</body>
</html>
Stop Data Collection
destroy() method of the Datazoom context object as in the following example:if (aws_ivs_player) {
aws_ivs_player.delete();
aws_ivs_player = null;
}
if (datazoom_context) {
datazoom_context.destroy();
datazoom_context = null;
}
NPM (Node Package Manager)
References:
Additional Examples
IVS plugin (tech) through a videojs player
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.14.3/video-js.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.14.3/video.min.js"></script>
<script src="https://player.live-video.net/1.4.0/amazon-ivs-videojs-tech.min.js"></script>
<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=<CONFIG_ID>'></script>
</head>
<body>
<div>
<div id="video-container" style="width:50%">
<video id="video" class="video-js vjs-16-9 vjs-big-play-centered" controls></video>
</div>
<hr/>
<button id="src_bunny">Bunny</button>
<button id="src_bipbop">BipBop</button>
<br/>
<input id="src" type="text" style="width:80%"></input>
<hr/>
<button id="create">Create</button>
<button id="destroy">Destroy</button>
</div>
<script>
registerIVSTech(videojs); // Register Amazon IVS as playback technology for Video.js
var vjs_player;
var datazoom_context;
var elSource = document.getElementById("src");
function setSourceURL(url) { elSource.value = url; }
document.getElementById("src_bunny").onclick = function() {
setSourceURL("https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8");
};
document.getElementById("src_bipbop").onclick = function() {
setSourceURL("https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8");
};
document.getElementById("create").onclick = function() {
var url = elSource.value;
if (!url) {
alert("Error: source URL is empty");
return;
}
vjs_player = videojs("video", { techOrder: [ "AmazonIVS" ] }, function() {
datazoom_context = datazoom.createContext(vjs_player.getIVSPlayer());
vjs_player.src(url);
});
};
document.getElementById("destroy").onclick = function() {
if (vjs_player) {
vjs_player.dispose();
vjs_player = null;
}
if (datazoom_context) {
datazoom_context.destroy();
datazoom_context = null;
}
};
</script>
</body>
</html>
IVS plugin (tech) through JW Player
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://content.jwplatform.com/libraries/<your.js>"></script>
<script src="https://player.live-video.net/1.4.0/amazon-ivs-jw-provider.min.js"></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>
<hr/>
<button id="src_bunny">Bunny</button>
<button id="src_bipbop">BipBop</button>
<br/>
<input id="src" type="text" style="width:80%"></input>
<hr/>
<button id="create">Create</button>
<button id="destroy">Destroy</button>
</div>
<script>
var jw_player;
var datazoom_context;
var elSource = document.getElementById("src");
function setSourceURL(url) { elSource.value = url; }
document.getElementById("src_bunny").onclick = function() {
setSourceURL("https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8");
};
document.getElementById("src_bipbop").onclick = function() {
setSourceURL("https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8");
};
document.getElementById("create").onclick = function() {
var url = elSource.value;
if (!url) {
alert("Error: source URL is empty");
return;
}
var config = {
playlist: [{ file: url, type: "ivs" }],
width: 640,
height: 360
};
jw_player = jwplayer("video").setup(config);
jw_player.on("providerPlayer", function(providerPlayer) {
datazoom_context = datazoom.createContext(providerPlayer.ivsPlayer);
});
};
document.getElementById("destroy").onclick = function() {
if (jw_player) {
jw_player.remove();
jw_player = null;
}
if (datazoom_context) {
datazoom_context.destroy();
datazoom_context = null;
}
};
</script>
</body>
</html>
Ad Frameworks Extensions
If your Javascript application has a media player with an ad framework, Datazoom’s Javascript Collector with a AWS IVS Media Player can be extended with the following ad framework extensions.
Supported Data Points
Events
Discrete occurrences driven by user interactions or system actions
Metadata
Player
Attributes
User
Fluxdata
Metrics measuring changing parameters over time
-
Bandwidth
-
Buffer Duration
-
Buffer Duration - Content
-
Buffer Length
-
Content Session Start Timestamp
-
Number of Content Plays
-
Number of Content Requests
-
Number of Errors - Content
-
Pause Duration
-
Pause Duration - Content
-
Playback Duration - Content
-
Playback Rate
-
Player State
-
Player Viewable
-
Player Viewable Percent
-
Playhead Position
-
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