author | rougeronj |
Thu, 22 Jan 2015 15:49:07 +0100 | |
changeset 122 | 3b11017a76a4 |
parent 121 | df6b39f962bc |
parent 119 | e6605fecb175 |
child 128 | 9f2334598088 |
permissions | -rw-r--r-- |
103 | 1 |
<!DOCTYPE html> |
2 |
<html lang="en"> |
|
3 |
<head> |
|
4 |
<meta charset="utf-8"> |
|
5 |
<meta name="viewport" content="width=device-width,initial-scale=1"> |
|
6 |
<meta name="description" content=""> |
|
7 |
<meta name="author" content="I.R.I"> |
|
8 |
<link rel="shortcut icon" href="/img/favicon.ico"> |
|
9 |
||
10 |
<title>AnnotsVizView</title> |
|
11 |
||
12 |
<!-- Custom styles for this template --> |
|
13 |
<link href="/css/annotviz.css" rel="stylesheet"> |
|
14 |
</head> |
|
15 |
||
16 |
<body> |
|
17 |
<h1>Piano Roll vertical</h1> |
|
18 |
<noscript>You must enable JavaScript</noscript> |
|
19 |
<div id="canvasContainer"></div> |
|
20 |
<!--pre id="log"></pre--> |
|
21 |
<script src="/js/libs-annotviz.js"></script> |
|
22 |
<script src="/js/annotviz.js"></script> |
|
23 |
<script> |
|
108 | 24 |
|
25 |
var PIXI = require('pixi'); |
|
26 |
||
103 | 27 |
var pianorollChannel = 'PIANOROLL'; |
28 |
var annotationChannel = 'ANNOT'; |
|
121
df6b39f962bc
Add getAnnotCategories to utils and propagate the modification to annotsvizview and annotstimeline
rougeronj
parents:
117
diff
changeset
|
29 |
var eventCode = 'atelier2'; |
df6b39f962bc
Add getAnnotCategories to utils and propagate the modification to annotsvizview and annotstimeline
rougeronj
parents:
117
diff
changeset
|
30 |
var serverUrl = "http://172.16.0.20:8080"; |
103 | 31 |
var wsUri; |
121
df6b39f962bc
Add getAnnotCategories to utils and propagate the modification to annotsvizview and annotstimeline
rougeronj
parents:
117
diff
changeset
|
32 |
|
105
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
33 |
if (window.location.protocol === 'file:') { |
104 | 34 |
wsUri = 'ws://172.16.0.20:8090/broadcast'; |
105
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
35 |
} |
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
36 |
else { |
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
37 |
wsUri = 'ws://' + window.location.hostname + ':8090/broadcast'; |
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
38 |
} |
103 | 39 |
wsUriPianoroll = wsUri + '?channel=' + pianorollChannel + '&event_code=' + eventCode; |
40 |
wsUriAnnotation = wsUri + '?channel=' + annotationChannel + '&event_code=' + eventCode; |
|
108 | 41 |
|
103 | 42 |
var logger = new annotviz.ConsoleLogger(true); |
108 | 43 |
|
103 | 44 |
var stageView = new annotviz.StageView({ |
45 |
logger: logger |
|
46 |
}); |
|
47 |
||
108 | 48 |
|
103 | 49 |
var annotsvizview = new annotviz.AnnotsVizView({ |
121
df6b39f962bc
Add getAnnotCategories to utils and propagate the modification to annotsvizview and annotstimeline
rougeronj
parents:
117
diff
changeset
|
50 |
urlCategories: serverUrl + "/p/api/v1/event/" + eventCode, |
103 | 51 |
logger: logger, |
52 |
stageView: stageView, |
|
53 |
wsPianoroll: new annotviz.WsWrapper(wsUriPianoroll, logger), |
|
54 |
wsAnnot: new annotviz.WsWrapper(wsUriAnnotation, logger), |
|
113 | 55 |
timeBegin: 1421919000000, |
56 |
timeEnd: 1421951400000 |
|
103 | 57 |
}); |
108 | 58 |
|
103 | 59 |
|
60 |
function stop() { |
|
61 |
stageView.stop(); |
|
62 |
} |
|
63 |
function start() { |
|
64 |
stageView.start(); |
|
65 |
} |
|
66 |
||
67 |
window.onload = function() { |
|
68 |
stageView.init(); |
|
69 |
start(); |
|
70 |
} |
|
71 |
</script> |
|
72 |
</body> |
|
73 |
</html> |