forked from CtrHellenicStudies/OpenVideoAnnotation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
147 lines (126 loc) · 5.77 KB
/
demo.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JS annotation test</title>
<!-- Annotator -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="http://assets.annotateit.org/annotator/v1.2.7/annotator-full.min.js"></script>
<link rel="stylesheet" href="http://assets.annotateit.org/annotator/v1.2.7/annotator.min.css">
<!--video-js-->
<link href="http://vjs.zencdn.net/4.2/video-js.css" rel="stylesheet">
<script src="lib/video-js/video.min.js"></script>
<!--Youtube Pluging-->
<script src="lib/video-js/vjs.youtube.js"></script>
<!--RangeSlider Pluging-->
<script src="lib/rangeslider.min.js"></script>
<link href="lib/rangeslider.min.css" rel="stylesheet">
<!--Share Pluging-->
<script src="lib/share-annotator.min.js"></script>
<link href="lib/share-annotator.min.css" rel="stylesheet">
<!--Geolocation Pluging-->
<script src="lib/geolocation-annotator.min.js"></script>
<link href="lib/geolocation-annotator.min.css" rel="stylesheet">
<!--RichText Pluging-->
<script src="lib/tinymce/tinymce.min.js"></script><!--tinymce for richText-->
<script src="lib/richText-annotator.min.js"></script>
<link href="lib/richText-annotator.min.css" rel="stylesheet">
<!--OpenVideoAnnotations Pluging-->
<script src="build/ova.min.js"></script>
<link href="build/ova.min.css" rel="stylesheet">
<!--Demo CSS-->
<link href="demo.css" rel="stylesheet">
</head>
<body style="margin:10px">
<header>
<h1>Javascript annotation service test</h1>
</header>
<div id="controls">
<h3>Controls</h3>
<p>
<input id="username" value="Mark">
</p>
</div>
<div id="airlock">
<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>
<video id="vid1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup=''>
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
</video>
<br />
The same video, but with different annotations:
<br />
<video id="vid2" class="video-js vjs-default-skin" controls preload="none" width="640" height="264"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup=''>
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
</video>
<br />
And you could use youtube video:
<br />
<video id="vid3" class="video-js vjs-default-skin" controls preload="none" width="640" height="264"
data-setup='{techOrder: ["html5","flash","youtube"]}'>
<source src="http://www.youtube.com/watch?v=-m_S-IDs3Wg" type="video/youtube">
</video>
<div onclick="ova.playTarget('8I2NBkJbQoeF3-bqgpcwTw')">Play a target</div>
<div onclick="ova.newVideoAn('vid1')">New Annotation in vid1</div>
<div onclick="ova.showDisplay('vid2')">showDisplay vid2</div>
</div>
<script>
//Options to load in Open Video Annotation, for all the plugins
var options = {
optionsAnnotator: {
permissions: { },
//auth: {tokenUrl:'http://catch.aws.af.cm/annotator/token'},
store: {
// The endpoint of the store on your server.
//prefix: 'http://afstore.aws.af.cm/annotator',
prefix: 'http://danielcebrian.com/annotations/api',
annotationData: {uri:'http://danielcebrian.com/annotations/demo.html'},
/*urls: {
// These are the default URLs.
create: '/create',
read: '/read/:id',
update: '/update/:id',
destroy: '/destroy/:id',
search: '/search'
},*/
loadFromSearch:{
limit:10000,
uri: 'http://danielcebrian.com/annotations/demo.html',
}
},
richText: {
tinymce:{
selector: "li.annotator-item textarea",
plugins: "media image insertdatetime link code",
menubar: false,
toolbar_items_size: 'small',
extended_valid_elements : "iframe[src|frameborder|style|scrolling|class|width|height|name|align|id]",
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media rubric | code ",
}
},
share: {}, //Share plugin
annotator: {}, //Annotator core
},
optionsVideoJS: {techOrder: ["html5","flash","youtube"]},
optionsRS: {},
optionsOVA: {posBigNew:'none'/*,NumAnnotations:20*/},
}
//Load the plugin Open Video Annotation
var ova = new OpenVideoAnnotation.Annotator($('#airlock'),options);
//change the user (Experimental)
ova.setCurrentUser($('#username').val());
$('#username').change(function () {
ova.setCurrentUser($(this).val());
});
</script>
</body>
</html>