-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.html
72 lines (66 loc) · 2.12 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Video.js Clarify Annotations</title>
<link href="node_modules/video.js/dist/video-js/video-js.css" rel="stylesheet">
<link href="lib/videojs-clarify-annotations.css" rel="stylesheet">
<style>
body {
font-family: Arial, sans-serif;
}
.info {
background-color: #eee;
border: thin solid #333;
border-radius: 3px;
padding: 0 5px;
text-align: center;
}
.video-js {
margin: 40px auto;
}
</style>
</head>
<body>
<div class="info">
<p>
You can see the Video.js Clarify Annotations plugin in action below.
Look at the source of this page to see how to use it with your videos.
</p>
</div>
<video id="video"
class="video-js vjs-default-skin"
height="300"
width="600"
controls>
<p>
Your browser doesn't support video. Please <a href="http://browsehappy.com/">upgrade your browser</a> to see the example.
</p>
<source src="http://media.clarify.io/video/presentations/SirKenRobinson-TED2006-How-Schools-Kill-Creativity.mp4" type="video/mp4">
</video>
<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/video.js/dist/video-js/video.js"></script>
<script src="lib/videojs-clarify-annotations.js"></script>
<script>
// First request the search results
$.getJSON('example_search_results.json', function (results) {
// There are two ways to call the plugin, either from the initial videojs call or by calling the plugin directly.
// Option 1: (options: { techOrder: ["flash", "html5", "other supported tech"] }
var player = videojs('video');
// Add the Clarify Notations to the player
var clarifyAnnotations = player.clarifyAnnotations(results, 0, { showButtons: true });
/*
// Options 2:
var player = videojs('video', {
plugins: {
clarifyAnnotations: {
showButtons: true
}
}
});
player.clarifyAnnotations(results,0);
*/
});
</script>
</body>
</html>