108
|
1 |
<html> |
|
2 |
<head> |
|
3 |
<meta charset="UTF-8"> |
|
4 |
<title>Piano Roll {{event.label}}</title> |
|
5 |
<link href="{{ config['STATIC_URL'] }}/css/annotviz.min.css" rel="stylesheet"> |
|
6 |
</head> |
|
7 |
<body> |
|
8 |
<h1>Piano Roll {{event.label}}</h1> |
|
9 |
<noscript>You must enable JavaScript</noscript> |
|
10 |
<div id="canvasContainer"></div> |
|
11 |
<p> |
|
12 |
<a href="#" onclick="stop(); return false;">stop intervals</a> - |
|
13 |
<a href="#" onclick="start(); return false;">start intervals</a> - |
|
14 |
temps écoulé : <span id="timeStarted"></span> |
|
15 |
</p> |
|
16 |
<pre id="log"></pre> |
|
17 |
<script src="{{ config['STATIC_URL'] }}/js/libs-annotviz.min.js"></script> |
|
18 |
<script src="{{ config['STATIC_URL'] }}/js/annotviz.min.js"></script> |
|
19 |
<script> |
|
20 |
|
|
21 |
var pianorollChannel = 'PIANOROLL'; |
|
22 |
var annotationChannel = 'ANNOT'; |
|
23 |
var eventCode = '{{event.code}}'; |
|
24 |
var wsUri = 'ws://' + window.location.hostname + ':8090/broadcast'; |
|
25 |
|
|
26 |
wsUriPianoroll = wsUri + '?channel=' + pianorollChannel + '&event_code=' + eventCode; |
|
27 |
wsUriAnnotation = wsUri + '?channel=' + annotationChannel + '&event_code=' + eventCode; |
|
28 |
|
|
29 |
var logger = new annotviz.ConsoleLogger(true); |
|
30 |
|
|
31 |
var stageView = new annotviz.StageView({ |
|
32 |
logger: logger |
|
33 |
}); |
|
34 |
|
132
|
35 |
var serverUrl = "http://" + window.location.hostname + ":8080"; |
108
|
36 |
var annotsvizview = new annotviz.AnnotsVizView({ |
131
|
37 |
urlCategories: serverUrl + "/p/api/v1/event/" + eventCode, |
108
|
38 |
logger: logger, |
|
39 |
stageView: stageView, |
|
40 |
wsPianoroll: new annotviz.WsWrapper(wsUriPianoroll, logger), |
|
41 |
wsAnnot: new annotviz.WsWrapper(wsUriAnnotation, logger), |
131
|
42 |
timeBegin: Date.parse("2015-01-23T09:30:00+01:00"), |
|
43 |
timeEnd: Date.parse("2015-01-23T18:30:00+01:00"), |
|
44 |
eventCode: eventCode, |
132
|
45 |
channel: annotationChannel |
108
|
46 |
}); |
|
47 |
|
|
48 |
|
|
49 |
function stop() { |
|
50 |
stageView.stop(); |
|
51 |
} |
|
52 |
function start() { |
|
53 |
stageView.start(); |
|
54 |
} |
|
55 |
|
|
56 |
window.onload = function() { |
|
57 |
stageView.init(); |
|
58 |
start(); |
|
59 |
} |
|
60 |
</script> |
|
61 |
</body> |
|
62 |
</html> |