img.html 1.37 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
<html>
    <head>
        <style>
            body {
                margin: 0px;
            }
            #cnv_div {
                border: 0px solid red;
            }
            #display{
                height: 100%;
            }
        </style>
    </head>
    <body>

        <div id='cnv_div'></div>

        <script src="js/elphel.js"></script>
        <script src="js/UTIF.js"></script>
        <script src="js/jquery-3.1.1.js"></script>
        <script src="js/jcanvas.js"></script>
        <script src="js/exif.js"></script>
        <script src="js/jquery-jp4.js"></script>

        <script>

            const IMGSRV_PORT0 = 2323;

            const params = new URLSearchParams(location.search);
            const port = params.get('port') || 0;
            const refresh = params.get('refresh') || 5;

            if (params.get('port')===null){
                let s = "";
                if (location.search===""){
                    s = "?port="+port;
                }else{
                    s = location.search+"&port="+port;
                }
                window.history.pushState('', '', location.pathname+s);
            }

            let imgsrv_port = IMGSRV_PORT0 + parseInt(port);

Oleg Dzhimiev's avatar
Oleg Dzhimiev committed
46
            let t1 = $("#cnv_div").jp4({src:"http://"+location.host+":"+imgsrv_port+"/img",width:1600,fast:true,lowres:2,debug:false,refresh:true});
47 48 49 50

    </script>
  </body>
</html>