author | rougeronj |
Thu, 22 Jan 2015 02:21:15 +0100 | |
changeset 105 | 25ac8802c189 |
parent 104 | 685c5ebc59d0 |
child 108 | 082b64a5c699 |
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> |
|
24 |
var pianorollChannel = 'PIANOROLL'; |
|
25 |
var annotationChannel = 'ANNOT'; |
|
105
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
26 |
var eventCode = 'test_1'; |
103 | 27 |
var wsUri; |
105
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
28 |
if (window.location.protocol === 'file:') { |
104 | 29 |
wsUri = 'ws://172.16.0.20:8090/broadcast'; |
105
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
30 |
} |
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
31 |
else { |
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
32 |
wsUri = 'ws://' + window.location.hostname + ':8090/broadcast'; |
25ac8802c189
Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents:
104
diff
changeset
|
33 |
} |
103 | 34 |
wsUriPianoroll = wsUri + '?channel=' + pianorollChannel + '&event_code=' + eventCode; |
35 |
wsUriAnnotation = wsUri + '?channel=' + annotationChannel + '&event_code=' + eventCode; |
|
36 |
|
|
37 |
var logger = new annotviz.ConsoleLogger(true); |
|
38 |
|
|
39 |
var stageView = new annotviz.StageView({ |
|
40 |
logger: logger |
|
41 |
}); |
|
42 |
||
43 |
var annotsvizview = new annotviz.AnnotsVizView({ |
|
44 |
logger: logger, |
|
45 |
stageView: stageView, |
|
46 |
wsPianoroll: new annotviz.WsWrapper(wsUriPianoroll, logger), |
|
47 |
wsAnnot: new annotviz.WsWrapper(wsUriAnnotation, logger), |
|
48 |
}); |
|
49 |
|
|
50 |
||
51 |
function stop() { |
|
52 |
stageView.stop(); |
|
53 |
} |
|
54 |
function start() { |
|
55 |
stageView.start(); |
|
56 |
} |
|
57 |
||
58 |
window.onload = function() { |
|
59 |
stageView.init(); |
|
60 |
start(); |
|
61 |
} |
|
62 |
</script> |
|
63 |
</body> |
|
64 |
</html> |