client/annotviz/app/annotsvizview.html
author rougeronj
Thu, 22 Jan 2015 09:26:43 +0100
changeset 111 a7b72620d227
parent 105 25ac8802c189
child 108 082b64a5c699
permissions -rw-r--r--
Add variable "wait". When this variable set, the annotsroll wait ignore some annotations, and wait before printing an otherone so there is no superposition. Can be passed as an options
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     1
<!DOCTYPE html>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     2
<html lang="en">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     3
<head>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     4
    <meta charset="utf-8">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     5
    <meta name="viewport" content="width=device-width,initial-scale=1">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     6
    <meta name="description" content="">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     7
    <meta name="author" content="I.R.I">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     8
    <link rel="shortcut icon" href="/img/favicon.ico">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
     9
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    10
    <title>AnnotsVizView</title>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    11
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    12
    <!-- Custom styles for this template -->
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    13
    <link href="/css/annotviz.css" rel="stylesheet">
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    14
</head>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    15
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    16
<body>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    17
    <h1>Piano Roll vertical</h1>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    18
    <noscript>You must enable JavaScript</noscript>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    19
    <div id="canvasContainer"></div>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    20
    <!--pre id="log"></pre-->
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    21
    <script src="/js/libs-annotviz.js"></script>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    22
    <script src="/js/annotviz.js"></script>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    23
    <script>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    24
	    var pianorollChannel  = 'PIANOROLL';
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    25
	    var annotationChannel = 'ANNOT';
105
25ac8802c189 Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents: 104
diff changeset
    26
	    var eventCode = 'test_1';
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    27
	    var wsUri;
105
25ac8802c189 Improve interface + Add horizontal pianoroll to annotsvizview
rougeronj
parents: 104
diff changeset
    28
	    if (window.location.protocol === 'file:') {
104
685c5ebc59d0 update resolution screen
rougeronj
parents: 103
diff changeset
    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
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    34
	    wsUriPianoroll = wsUri + '?channel=' + pianorollChannel + '&event_code=' + eventCode;
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    35
	    wsUriAnnotation = wsUri + '?channel=' + annotationChannel + '&event_code=' + eventCode;
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    36
	
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    37
	    var logger = new annotviz.ConsoleLogger(true);
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    38
	    
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    39
	    var stageView = new annotviz.StageView({
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    40
	    	logger: logger
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    41
	    });
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    42
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    43
        var annotsvizview = new annotviz.AnnotsVizView({
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    44
        	logger: logger,
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    45
        	stageView: stageView,
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    46
        	wsPianoroll: new annotviz.WsWrapper(wsUriPianoroll, logger),
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    47
        	wsAnnot: new annotviz.WsWrapper(wsUriAnnotation, logger),
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    48
        });
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    49
      
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    50
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    51
        function stop() {
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    52
        	stageView.stop();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    53
        }
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    54
        function start() {
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    55
        	stageView.start();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    56
        }
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    57
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    58
        window.onload = function() {
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    59
        	stageView.init();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    60
            start();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    61
        }
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    62
    </script>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    63
</body>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    64
</html>