author | rougeronj |
Thu, 22 Jan 2015 09:26:43 +0100 | |
changeset 111 | a7b72620d227 |
parent 100 | 0d7dac03c1a0 |
permissions | -rw-r--r-- |
95 | 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 |
||
98 | 10 |
<title>Vertical Piano Roll</title> |
95 | 11 |
|
12 |
<!-- Custom styles for this template --> |
|
13 |
<link href="/css/annotviz.css" rel="stylesheet"> |
|
14 |
</head> |
|
15 |
||
16 |
<body> |
|
98 | 17 |
<h1>Vertical Piano Roll</h1> |
95 | 18 |
<noscript>You must enable JavaScript</noscript> |
19 |
<div id="canvasContainer"></div> |
|
20 |
<p> |
|
21 |
<a href="#" onclick="stop(); return false;">stop intervals</a> - |
|
22 |
<a href="#" onclick="start(); return false;">start intervals</a> - |
|
23 |
temps écoulé : <span id="timeStarted"></span> |
|
24 |
</p> |
|
25 |
<pre id="log"></pre> |
|
26 |
<script src="/js/libs-annotviz.js"></script> |
|
27 |
<script src="/js/annotviz.js"></script> |
|
28 |
<script> |
|
98 | 29 |
var annotationChannel = 'PIANOROLL'; |
30 |
var eventCode = 'test_1'; |
|
31 |
var wsUri; |
|
32 |
if (window.location.protocol === 'file:') { |
|
33 |
wsUri = 'ws://127.0.0.1:8090/broadcast'; |
|
34 |
} |
|
35 |
else { |
|
36 |
wsUri = 'ws://' + window.location.hostname + ':8090/broadcast'; |
|
37 |
} |
|
38 |
wsUri += '?channel='+annotationChannel+'&event_code='+eventCode; |
|
100
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
39 |
|
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
40 |
var logger = new annotviz.HtmlLogger(false, 'log'); |
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
41 |
|
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
42 |
var stageView = new annotviz.StageView({ |
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
43 |
logger: logger |
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
44 |
}); |
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
45 |
|
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
46 |
var doubleroll = new annotviz.DoubleRoll({ |
95 | 47 |
orientation: 'vertical', |
100
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
48 |
logger: logger, |
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
49 |
stageView: stageView, |
98 | 50 |
ws: new annotviz.WsWrapper(wsUri) |
95 | 51 |
}); |
100
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
52 |
function stop() { stageView.stop(); } |
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
53 |
function start() { stageView.start(); } |
98 | 54 |
|
55 |
window.onload = function() { |
|
100
0d7dac03c1a0
Merge with 72d767c5142df7fc6387215096321295fbaaa73d
rougeronj
parents:
98
diff
changeset
|
56 |
stageView.init(); |
98 | 57 |
start(); |
58 |
}; |
|
59 |
||
95 | 60 |
</script> |
61 |
</body> |
|
62 |
</html> |