--- a/client/annotviz/app/pianoroll_v.html Mon Jan 19 16:44:59 2015 +0100
+++ b/client/annotviz/app/pianoroll_v.html Tue Jan 20 11:57:44 2015 +0100
@@ -7,14 +7,14 @@
<meta name="author" content="I.R.I">
<link rel="shortcut icon" href="/img/favicon.ico">
- <title>Piano Roll Vertical</title>
+ <title>Vertical Piano Roll</title>
<!-- Custom styles for this template -->
<link href="/css/annotviz.css" rel="stylesheet">
</head>
<body>
- <h1>Piano Roll vertical</h1>
+ <h1>Vertical Piano Roll</h1>
<noscript>You must enable JavaScript</noscript>
<div id="canvasContainer"></div>
<p>
@@ -26,12 +26,31 @@
<script src="/js/libs-annotviz.js"></script>
<script src="/js/annotviz.js"></script>
<script>
+ var annotationChannel = 'PIANOROLL';
+ var eventCode = 'test_1';
+ var wsUri;
+ if (window.location.protocol === 'file:') {
+ wsUri = 'ws://127.0.0.1:8090/broadcast';
+ }
+ else {
+ wsUri = 'ws://' + window.location.hostname + ':8090/broadcast';
+ }
+ wsUri += '?channel='+annotationChannel+'&event_code='+eventCode;
+
+
var doubleroll = annotviz.DoubleRoll({
- eventCode: 'test_1',
orientation: 'vertical',
+ logger: new annotviz.HtmlLogger(false, 'log'),
+ ws: new annotviz.WsWrapper(wsUri)
});
function stop() { doubleroll.stop(); }
function start() { doubleroll.start(); }
+
+ window.onload = function() {
+ doubleroll.init();
+ start();
+ };
+
</script>
</body>
</html>