-
Notifications
You must be signed in to change notification settings - Fork 0
/
table.html
107 lines (86 loc) · 2.72 KB
/
table.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
<!DOCTYPE html>
<html>
<head>
<title>Visual Navigation Demos - Ximpel</title>
<link rel="stylesheet" href="ximpel/ximpel.css" type="text/css" />
<style type="text/css">
html,body, #ximpel {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
<script type="text/javascript" src="jquery/jquery-1.12.3.min.js"></script>
<script type="text/javascript" src="hammer/hammer.min.js"></script>
<script type="text/javascript" src="ximpel/ximpel.js"></script>
<!-- custom media types -->
<script type="text/javascript" src="PDFViewer.js"></script>
<script type="text/javascript" src="MetadataVisualization.js"></script>
<!-- helper for book operations -->
<script type="text/javascript" src="bookManager.js"></script>
<!-- idle tracker and analytics functions-->
<script type="text/javascript" src="analytics.js?v=8"></script>
<script type="text/javascript" src="idletracker.js?v=8"></script>
<script type="text/javascript">
var app, timer, currentSubject, timeout, player;
var idleTracker = new IdleTracker({
mousemove: false,
limit: 120, // 120 seconds by default
rules: [
{
pattern: /^video:/,
pause: true, // Idle timer is paused during videos
}
],
});
var analytics = new ximpel.Analytics(
'https://ub-www01.uio.no/microticks/api/',
// Generated from `cd /srv/ub-www01.uio.no/microticks/api && export FLASK_APP=microticks && . ENV/bin/activate && flask createconsumer visual-navigation-demos
'9bfc4d87d3f444438c487143394926f4', // Production key
// 'a67567e486f94e50869b5d1566c04c32' // Test key
//consumer=8 (?)
);
analytics.trackMeaninglessClicks = true;
function initApp(){
app = new ximpel.XimpelApp(
'ximpelapp',
'playlist.xml',
'config.xml',
{
'appElement': 'ximpel',
}
);
// After creating a XimpelApp object tell the object to load the given playlist and config file.
app.load( {
'autoPlay': true
}).done( function(){
// Connect Analytics to Ximpel
analytics.setXimpelApp(app);
// Connect IdleTracker to Ximpel
idleTracker.setXimpelApp(app);
idleTracker.setAnalytics(analytics);
}.bind(this));
}
var resizeTimer;
function onResize() {
clearTimeout(resizeTimer);
if (analytics) {
console.log('Ending session because of resize!');
analytics.stopSession('resize');
}
idleTracker.stop();
resizeTimer = setTimeout(function() {
$('#ximpel').empty();
$('#ximpel').removeAttr('style');
setTimeout(initApp);
}, 500);
}
$( document ).ready( onResize );
$( window ).on('resize', onResize );
</script>
</head>
<body>
<div id="ximpel"></div>
</body>
</html>