forked from tkurz/lime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfullscreen.html
More file actions
306 lines (274 loc) · 14.3 KB
/
fullscreen.html
File metadata and controls
306 lines (274 loc) · 14.3 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<title>ConnectMe Player</title>
<!-- Loading dependencies -->
<script type="text/javascript" src="lib/jquery/jquery-1.7.1.js"></script>
<script type="text/javascript" src="lib/underscoreJS/underscore.min.js"></script>
<script type="text/javascript" src="lib/backboneJS/backbone.js"></script>
<script type="text/javascript" src="lib/rdfquery/latest/jquery.rdfquery.debug.js"></script>
<script type="text/javascript" src="lib/vie/vie.js"></script>
<script type="text/javascript" src="lib/iscroll/iscroll.js"></script>
<!-- Plugin dependencies -->
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=weather"></script>
<link href="css/video-js1.css" rel="stylesheet">
<!--[if lte IE 7]>
<link rel="stylesheet" href='css/ie_fixes.css' type="text/css" media="screen, projection"/>
<![endif]-->
<!-- The VideoJS player -->
<script src="lib/videojs/video.js?a=1"></script>
<script type="text/javascript" src="lib/utils.js?a=1"></script>
<!-- The Lime player -->
<script type="text/javascript" src="lib/lime.js?a=1"></script>
<!-- plugins -->
<script type="text/javascript" src="lib/plugins/geonamesmapplugin.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/dbpediainfoplugin.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/googleweatherplugin.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/annotationmodalwindow.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/lsiimageplugin.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/videoplugin.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/youtubeplugin.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/mediaplugin.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/businessplugin.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/bookingplugin.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/tvplugin.js?a=1"></script>
<!--
<script src="lib/plugins/googledirectionplugin.js"></script>
-->
<!-- settings -->
<script type="text/javascript" src="lib/settings/admin.js?a=1"></script>
<script type="text/javascript" src="lib/settings/statistics.js?a=1"></script>
<script type="text/javascript" src="lib/settings/usersettings.js?a=1"></script>
<script type="text/javascript" src="lib/plugins/help.js?a=1"></script>
<link href="css/full-screen.css" rel="stylesheet">
<!--<script type="text/javascript" src="lib/jquery/jquery-ui-1.8.21.min.js"></script>-->
<script type="text/javascript">
/* document.body.addEventListener('touchmove', function(event) {
event.preventDefault();
}, false); */
</script>
<script type="text/javascript" language="javascript">
/*
VIDEO1: https://s3-eu-west-1.amazonaws.com/yoo.120/connectme/6306_519_20120508125738_standard.mp4
VIDEO2: https://s3-eu-west-1.amazonaws.com/yoovis-videos/6256_519_connectme_volksbuehne_heldenmp4_standardmpeg_20120427015958_standard.mp4
*/
$(document).ready(function () {
var desiredHeight = window.innerHeight;
var desiredWidth = window.innerWidth;
var headerHeight = $("#header").height();
if (window.innerWidth < desiredHeight)
desiredHeight = window.innerWidth * 80 / 100;
desiredHeight = desiredHeight - headerHeight;
var local = JSON.parse(UTILS.getParameterByName('local') || 'false');
var videoUrl = UTILS.getParameterByName('videoUrl');
var cmfurl = UTILS.getParameterByName('cmfUrl').replace(/\/$/, '') + '/' || "http://connectme.salzburgresearch.at/CMF/";
var lang = UTILS.getParameterByName('lang') || 'en';
var cmf = new CMF(cmfurl);
var getAnnotations = function (cb) {
if (local) {
jQuery.getJSON('annotations.json', function (res) {
console.info('annotation JSON', res.results.bindings);
cb(false, res.results.bindings);
});
} else {
cmf.getAnnotationsForVideoOrLocator(videoUrl, cb);
}
};
var getLocators = function (cb) {
if (local) {
var dir = "http://s3-eu-west-1.amazonaws.com/yoo.120/connectme";
// var dir = "videos";
var locators = [
{"source":dir + "/6306_519_20120508125738_ogg.ogv", "type":"video/ogv"},
{"source":dir + "/6306_519_20120508125738_standard.mp4", "type":"video/mp4"},
{"source":dir + "/6306_519_20120508125738_webm.webm", "type":"video/webm"}
];
cb(false, locators);
} else {
cmf.getLocatorsForVideoOrLocator(videoUrl, cb);
}
};
getLocators(function (err, locators) {
var x = _.uniq(locators,false,function(i){
return i['source'];
})
locators = x;
console.info("locators", locators);
if (err || locators.length == 0) {
console.error("Error getting video locators", err, locators);
alert("Error getting video locators for " + videoUrl);
return
}
getAnnotations(function (err, annotations) {
if (err) {
console.error("Error getting annotations", err);
alert("Error loading annotations");
return;
}
console.info("Annotations - before", annotations);
/*var x = _.uniq(annotations,false, function(item){
return item.resource.value;
})
annotations = x;*/
annotations = _(annotations).map(function (ann) {
return new Annotation(ann);
});
console.info("Annotations", annotations);
var options = {
video:locators,
// activeWidgetTypes: ['DbpediaInfoWidget'],
local:local,
annotations:annotations,
containerDiv:"mainwrapper",
videoPlayerSize:{"width":desiredWidth, "height":desiredHeight},
vPlayer:"VideoJS",
// annotFrameworkURL:"http://connectme.salzburgresearch.at/CMF/",
annotFrameworkURL:cmfurl,
plugins:{
GeoNamesMapPlugin:{},
AnnotationModalWindow:{},
DBPediaInfoPlugin:{},
BusinessPlugin:{},
BookingPlugin:{},
/* YoutubePlugin:{}, */
VideoPlugin:{},
/* MediaPlugin:{},*/
/* TVPlugin: {}, */
/* LSIImagePlugin: {
preferredContainer: {element:jQuery('#widget-container-2'), orientation:'horizontal'}
},*/
Help: {},
/* AdminPlugin:{}, */
StatisticsPlugin:{},
UserSettingsPlugin:{}
},
// plugins:[TestPlugin, LDPlugin, AnnotationOverlays],
LDPlugin: {
stanbolUrl: "http://www.corsproxy.com/connectme.salzburgresearch.at/production/stanbol/config"
},
widgetContainers:[
{element:jQuery('#widget-container-2'), orientation:'horizontal'}
],
annotationsVisible:true,
preferredLanguage:lang
};
window.lime = LimePlayer = new LIMEPlayer(options);
console.log(LimePlayer);
});
})
});
</script>
</head>
<body>
<div id="header" class="header" align="left">
<a href="./" style="float: left"><img src="img/connectme_logo_web.png" width="204" height="40" border="0"/></a>
<div class="settings" style="position: relative; float:left;">
<!-- <div class="stats" style="float: left;"> <img src="img/statistics.png" style="width: 40px; height: 40px; float: left;" /> </div>
<div class="usersettings" style="float: left;"> <img src="img/settings.png" style="width: 40px; height: 40px; float: left;" /> </div>
<!-- <div class="admin" style="float: left;"> <img src="img/admin.png" style="width: 30px; height: 30px; float: left;" /> </div> -->
<div class="help" style="float: left;">
<img src="img/help.png" style="width: 36px; height: 35px; float: left; cursor: hand; cursor: pointer; display: block;"/>
</div>
</div>
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fplayer.connectme.at%2F&send=false&layout=button_count&width=100&show_faces=false&font=tahoma&colorscheme=dark&action=like&height=21&appId=423139431077335" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px; float:left; margin-left: 20px; margin-top: 5px;" allowTransparency="true"></iframe>
<div>
<img src="img/safari.png" style="width: 30px; height: 30px; float: right; margin-right: 15px;"/>
<img src="img/firefox.png" style="width: 30px; height: 30px; float: right; margin-right: 15px;"/>
<img src="img/chrome.png" style="width: 30px; height: 30px; float: right; margin-right: 15px;"/>
<!-- <img class="slideoutbutton" src="img/slideout.png"
style="width: 40px; height: 40px; float: right; margin-right: 15px; cursor: hand; cursor: pointer;"/> -->
</div>
</div>
<div text-align="center" id="container">
<div id="widget-container-1" class="widget-container horizontal" style="display: none">
</div>
<div id="wrapper" data="only for mobile devices" >
<div id="widget-container-2" data-collapsed="0" class="widget-container horizontal"></div>
</div>
<div class="mainwrapper" id="mainwrapper" align="center"></div>
<!--
<div id="widget-container-1" class="widget-container vertical"> </div>
<div class="mainwrapper" id="mainwrapper" align="center">
</div>
<div id="widget-container-2" class="widget-container vertical"> </div> -->
</div>
<!-- Attache widget container toggle logic -->
<script type="text/javascript" language="javascript">
slideOut = true;
//$("#widget-container-2").css('right',slideRight + "px" );
//$("div .lime-widget").css('right',slideRight + "px" );
//console.log("i should be folded");
$(".slideoutbutton").click(function (e) {
if (slideOut) {
slideRight = $("div .lime-widget").width();
slideRight = 10 - slideRight;
$("div .lime-widget").css('transition', 'right 2s');
$("div .lime-widget").css("-webkit-transition", "right 2s");
$("div .lime-widget").css('-webkit-transition', 'right 2s');
$("div .lime-widget").css('-o-transition', 'right 2s');
$("div .lime-widget").css('right', slideRight + "px");
$("#widget-container-2").data("collapsed", 1);
// change buttn image to src="img/slidein.png"
$(".slideoutbutton").attr('src', "img/slidein.png");
} else {
$("div .lime-widget").css('transition', 'right 2s');
$("div .lime-widget").css("-webkit-transition", "right 2s");
$("div .lime-widget").css('-webkit-transition', 'right 2s');
$("div .lime-widget").css('-o-transition', 'right 2s');
$("div .lime-widget").css('right', 0);
$("#widget-container-2").data("collapsed", 0);
//console.log("Widget container 2 - data is set to :");
//console.log($("#widget-container-2").data("collapsed"));
// change button image to src="img/slideout.png"
$(".slideoutbutton").attr('src', "img/slideout.png");
}
slideOut = !slideOut;
//console.log("toggle");
});
</script>
<!-- Video player resize to full window width+ height -->
<script type="text/javascript" language="javascript">
var resize = function () {
desiredHeight = window.innerHeight;
if (window.innerWidth / desiredHeight >= 1.3) {
desiredHeight = window.innerHeight;
} else {
desiredHeight = window.innerWidth * 60 / 100;
}
headerHeight = $("#header").height();
$("#video_player").css("height", desiredHeight - headerHeight);
$("#video_player").css("width", window.innerWidth);
//$("#wrapper").css("height", window.innerHeight - 39 - headerHeight);
$("#wrapper").css("height", desiredHeight - $("#header").height() - headerHeight);
// $(".slideoutbutton").trigger('click');
var playerWidth = $("#video_player").width();
var playerHeight = $("#video_player").height();
//console.log("LOAD== playerWidth: " + playerWidth + " playerHeight: " + playerHeight);
}
window.onload = resize;
window.onresize = resize;
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36834976-1']);
_gaq.push(['_setDomainName', 'connectme.at']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>