Application collectors
AWS IVS Media Player
v2.26.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
1<script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>CONFIG_ID value with Collector configuration id.1<script src="https://player.live-video.net/1.21.0/amazon-ivs-player.min.js"></script>Activate Data Collection for an AWS IVS Player
1datazoom_context = datazoom.createContext(aws_ivs_player);1<!DOCTYPE html>2<html lang="en">34<head>5 <!-- THE AWS IVS SCRIPT -->6 <script src="https://player.live-video.net/1.16.0/amazon-ivs-player.min.js"></script>7 <!-- THE DATAZOOM BEACON SCRIPT -->8 <script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=CONFIG_ID'></script>9</head>1011<body>12 <!-- THE VIDEO PLAYER -->13 <div>14 <video id="video" style="width:50%;height:50%" controls></video>15 </div>16 <script>17 var aws_ivs_player;18 var datazoom_context;19 var url = "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8";20 21 // Create a Player instance22 if (IVSPlayer.isPlayerSupported) {23 aws_ivs_player = IVSPlayer.create();24 aws_ivs_player.attachHTMLVideoElement(document.getElementById("video"));25 aws_ivs_player.load(url);26 27 // Activates data collection28 datazoom_context = datazoom.createContext(aws_ivs_player);29 }30 </script>31</body>3233</html>Stop Data Collection
destroy() method of the Datazoom context object as in the following example:1if (aws_ivs_player) {2 aws_ivs_player.delete();3 aws_ivs_player = null;4}56if (datazoom_context) {7 datazoom_context.destroy();8 datazoom_context = null;9}NPM (Node Package Manager)
References:
Additional Examples
IVS plugin (tech) through a videojs player
1<!DOCTYPE html>2<html lang="en">34<head>5 <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.14.3/video-js.css">6 <script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.14.3/video.min.js"></script>7 <script src="https://player.live-video.net/1.4.0/amazon-ivs-videojs-tech.min.js"></script>8 <script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=<CONFIG_ID>'></script>9</head>1011<body>1213<div>14 <div id="video-container" style="width:50%">15 <video id="video" class="video-js vjs-16-9 vjs-big-play-centered" controls></video>16 </div>17 <hr/>18 <button id="src_bunny">Bunny</button>19 <button id="src_bipbop">BipBop</button>20 <br/>21 <input id="src" type="text" style="width:80%"></input>22 <hr/>23 <button id="create">Create</button>24 <button id="destroy">Destroy</button>25</div>2627<script>2829 registerIVSTech(videojs); // Register Amazon IVS as playback technology for Video.js3031 var vjs_player;32 var datazoom_context;3334 var elSource = document.getElementById("src");3536 function setSourceURL(url) { elSource.value = url; }3738 document.getElementById("src_bunny").onclick = function() {39 setSourceURL("https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8");40 };41 document.getElementById("src_bipbop").onclick = function() {42 setSourceURL("https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8");43 };4445 document.getElementById("create").onclick = function() {46 var url = elSource.value;47 if (!url) {48 alert("Error: source URL is empty");49 return;50 }5152 vjs_player = videojs("video", { techOrder: [ "AmazonIVS" ] }, function() {53 datazoom_context = datazoom.createContext(vjs_player.getIVSPlayer());54 vjs_player.src(url);55 });56 };5758 document.getElementById("destroy").onclick = function() {59 if (vjs_player) {60 vjs_player.dispose();61 vjs_player = null;62 }63 if (datazoom_context) {64 datazoom_context.destroy();65 datazoom_context = null;66 }67 };6869</script>7071</body>7273</html>IVS plugin (tech) through JW Player
1<!DOCTYPE html>2<html lang="en">34<head>5 <script src="https://content.jwplatform.com/libraries/<your.js>"></script>6 <script src="https://player.live-video.net/1.4.0/amazon-ivs-jw-provider.min.js"></script>7 <script src='https://platform.datazoom.io/beacon/v1/config?configuration_id=<CONFIG_ID>'></script>8</head>910<body>1112<div>13 <div id="video" style="width:50%"></div>14 <hr/>15 <button id="src_bunny">Bunny</button>16 <button id="src_bipbop">BipBop</button>17 <br/>18 <input id="src" type="text" style="width:80%"></input>19 <hr/>20 <button id="create">Create</button>21 <button id="destroy">Destroy</button>22</div>2324<script>2526 var jw_player;27 var datazoom_context;2829 var elSource = document.getElementById("src");3031 function setSourceURL(url) { elSource.value = url; }3233 document.getElementById("src_bunny").onclick = function() {34 setSourceURL("https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8");35 };36 document.getElementById("src_bipbop").onclick = function() {37 setSourceURL("https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8");38 };3940 document.getElementById("create").onclick = function() {41 var url = elSource.value;42 if (!url) {43 alert("Error: source URL is empty");44 return;45 }4647 var config = {48 playlist: [{ file: url, type: "ivs" }],49 width: 640,50 height: 36051 };5253 jw_player = jwplayer("video").setup(config);5455 jw_player.on("providerPlayer", function(providerPlayer) {56 datazoom_context = datazoom.createContext(providerPlayer.ivsPlayer);57 });58 };5960 document.getElementById("destroy").onclick = function() {61 if (jw_player) {62 jw_player.remove();63 jw_player = null;64 }65 if (datazoom_context) {66 datazoom_context.destroy();67 datazoom_context = null;68 }69 };7071</script>7273</body>7475</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 (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)
-
Heartbeat Recency (Content Session)
-
Pause Duration (Content Session)
-
Pause Recency (Content Session)
-
Playback Rate
-
Player State
-
Player Viewable
-
Player Viewable Percent
-
Playhead Position
-
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)
- Volume