client/annotviz/app/annotsvizview.html
author rougeronj
Thu, 16 Apr 2015 12:15:33 +0200
changeset 153 60bd2b36b9dc
parent 141 e6892a30d454
permissions -rw-r--r--
put showTime as an option and add it to static pianoroll template on server

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="I.R.I">
    <link rel="shortcut icon" href="/img/favicon.ico">

    <title>AnnotsVizView</title>

    <!-- Custom styles for this template -->
    <link href="/css/annotviz.css" rel="stylesheet">
</head>

<body>
    <h1>Piano Roll vertical</h1>
    <noscript>You must enable JavaScript</noscript>
    <div id="canvasContainer"></div>
    <!--pre id="log"></pre-->
    <script src="/js/libs-annotviz.js"></script>
    <script src="/js/annotviz.js"></script>
    <script>

        var pianorollChannel  = 'PIANOROLL';
        var annotationChannel = 'ANNOT';
        var eventCode = 'atelier2_jour3';
        var eventCodeSessionDay2 = 'atelier2_jour2';
        var eventCodeSessionDay1 = 'atelier2';
        var serverUrl = "http://172.16.0.20:8080";
        var wsUri;

        wsUri = 'ws://172.16.0.20:8090/broadcast';
        wsUriPianoroll = wsUri + '?channel=' + pianorollChannel + '&event_code=' + eventCode;
        wsUriAnnotation = wsUri + '?channel=' + annotationChannel + '&event_code=' + eventCode;

        var logger = new annotviz.ConsoleLogger(true);

        var stageView = new annotviz.StageView({
            logger: logger
        });

        var annotsvizview = new annotviz.AnnotsVizView({
            urlCategories: serverUrl + "/p/api/v1/event/",
            logger: logger,
            stageView: stageView,
            serverUrl:serverUrl,
            wsPianoroll: new annotviz.WsWrapper(wsUriPianoroll, logger),
            wsAnnot: new annotviz.WsWrapper(wsUriAnnotation, logger),
            timeBegin: Date.parse("2015-01-24T09:30:00+01:00"),
            timeEnd: Date.parse("2015-01-24T18:30:00+01:00"),
            eventCode: eventCode,
            eventCodeSessionDay2: eventCodeSessionDay2,
            eventCodeSessionDay1: eventCodeSessionDay1,
            channel: annotationChannel
        });


        function stop() {
            stageView.stop();
        }
        function start() {
            stageView.start();
        }

        window.onload = function() {
            stageView.init();
            start();
        }
    </script>
</body>
</html>