client/annotviz/app/annotsvizview.html
author rougeronj
Fri, 23 Jan 2015 00:43:54 +0100
changeset 128 9f2334598088
parent 122 3b11017a76a4
child 129 7181e1f28eb0
permissions -rw-r--r--
add archive variable to desactivate the socket listening for the static timeLines
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>
108
082b64a5c699 add vizualizations to server
ymh <ymh.work@gmail.com>
parents: 105
diff changeset
    24
082b64a5c699 add vizualizations to server
ymh <ymh.work@gmail.com>
parents: 105
diff changeset
    25
        var PIXI = require('pixi');
082b64a5c699 add vizualizations to server
ymh <ymh.work@gmail.com>
parents: 105
diff changeset
    26
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    27
	    var pianorollChannel  = 'PIANOROLL';
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    28
	    var annotationChannel = 'ANNOT';
128
9f2334598088 add archive variable to desactivate the socket listening for the static timeLines
rougeronj
parents: 122
diff changeset
    29
	    var eventCode = 'test_1';
9f2334598088 add archive variable to desactivate the socket listening for the static timeLines
rougeronj
parents: 122
diff changeset
    30
	    var serverUrl = "http://localhost:8080";
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    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
685c5ebc59d0 update resolution screen
rougeronj
parents: 103
diff changeset
    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
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    39
	    wsUriPianoroll = wsUri + '?channel=' + pianorollChannel + '&event_code=' + eventCode;
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    40
	    wsUriAnnotation = wsUri + '?channel=' + annotationChannel + '&event_code=' + eventCode;
108
082b64a5c699 add vizualizations to server
ymh <ymh.work@gmail.com>
parents: 105
diff changeset
    41
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    42
	    var logger = new annotviz.ConsoleLogger(true);
108
082b64a5c699 add vizualizations to server
ymh <ymh.work@gmail.com>
parents: 105
diff changeset
    43
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    44
	    var stageView = new annotviz.StageView({
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    45
	    	logger: logger
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    46
	    });
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    47
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    48
        var annotsvizview = new annotviz.AnnotsVizView({
121
df6b39f962bc Add getAnnotCategories to utils and propagate the modification to annotsvizview and annotstimeline
rougeronj
parents: 117
diff changeset
    49
        	urlCategories: serverUrl + "/p/api/v1/event/" + eventCode,
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    50
        	logger: logger,
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    51
        	stageView: stageView,
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    52
        	wsPianoroll: new annotviz.WsWrapper(wsUriPianoroll, logger),
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    53
        	wsAnnot: new annotviz.WsWrapper(wsUriAnnotation, logger),
113
7531e4180915 Minor time correction
rougeronj
parents: 108
diff changeset
    54
        	timeBegin: 1421919000000,
128
9f2334598088 add archive variable to desactivate the socket listening for the static timeLines
rougeronj
parents: 122
diff changeset
    55
        	timeEnd: 1421951400000,
9f2334598088 add archive variable to desactivate the socket listening for the static timeLines
rougeronj
parents: 122
diff changeset
    56
        	eventCode: eventCode,
9f2334598088 add archive variable to desactivate the socket listening for the static timeLines
rougeronj
parents: 122
diff changeset
    57
            channel: annotationChannel
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    58
        });
108
082b64a5c699 add vizualizations to server
ymh <ymh.work@gmail.com>
parents: 105
diff changeset
    59
103
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    60
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    61
        function stop() {
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    62
        	stageView.stop();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    63
        }
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    64
        function start() {
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    65
        	stageView.start();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    66
        }
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    67
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    68
        window.onload = function() {
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    69
        	stageView.init();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    70
            start();
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    71
        }
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    72
    </script>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    73
</body>
123a611c7903 minor update of options and add annotsvizview
rougeronj
parents:
diff changeset
    74
</html>