-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample.html
40 lines (39 loc) · 1.34 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!doctype html>
<html>
<head><title>Akamai Analytics Plugin Example</title></head>
<style>
.example-description {
background-color: #ddd;
border: thin solid #333;
padding: 5px;
}
</style>
<link rel="stylesheet" href="libs/video-js-4.1.0/video-js.css">
<script src="libs/video-js-4.1.0/video.js"></script>
<body>
<p class="example-description">
You can see a player configured with the Akamai Analytics plugin below. Check out
the page source to see an example of how to configure the plugin yourself.
</p>
<video class="video-js vjs-default-skin" src="http://vjs.zencdn.net/v/oceans.mp4" data-setup="{}" controls></video>
<!-- Load Akamai js -->
<script src="http://79423.analytics.edgesuite.net/html5/akamaihtml5-min.js"></script>
<script src="src/videojs.akamai-analytics.js"></script>
<!--
video.js will automatically initialize the video element since it's loaded in
the head of the document but you still need to configure and initialize the
plugin.
-->
<script>
var
// save a reference to the video element
video = document.querySelector('video'),
// save a reference to the video.js player for that element
player = videojs(video);
// initialize the plugin with some custom options:
player.akamaiAnalytics({
config: "http://ma399-r.analytics.edgesuite.net/config/beacon-YOUR-ID.xml?enableGenericAPI=1"
});
</script>
</body>
</html>