-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
30 lines (29 loc) · 1.09 KB
/
index.html
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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ITS HD-FLiR-B/W</title>
<meta charset="UTF-8">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<script type="text/javascript" charset="utf-8">
function start(connect) {
var s = new WebSocket("ws://10.101.8.26:9876/");
s.onopen = function(e) {document.getElementById("connection").innerHTML="Connection: open"; }
s.onclose = function(e) {document.getElementById("connection").innerHTML="Connection: closed"; }
s.onclose = function(){
setTimeout(function(){start(connect)}, 500);}
s.onmessage =function(e){
var thermal = document.getElementById('image');
thermal.src = 'data:image/jpg;base64,'+e.data;
document.body.appendChild(thermal);
}
}
start();
}
</script>
</head>
<body><center>
<img id = "image" style="display:block; margin:0 auto; height="60%" width="60%"/>
<!--<p id ="connection"></p>-->
<!--<p id = "output"></p>-->
</center></body>
</html>