-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
45 lines (33 loc) · 965 Bytes
/
index.html
File metadata and controls
45 lines (33 loc) · 965 Bytes
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script src="/socket.io/socket.io.js"></script>
<script src="/js/jquery-1.8.3.min.js"></script>
<title>index</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<img id="still" src="./still.jpg" />
<script>
var socket = io.connect('http://192.168.1.11:8082');
//var socket = io.connect('http://192.168.0.144:8083');
//var sargs = $.map(args, function(val,i){ return i + ' ' + val }).join(' ');
socket.on('news', function (data) {
console.log(data);
if (data.status == 'raspicamDone'){
$('#still').attr('src', './still.jpg?ts=' + (new Date()).getTime());
}
});
$('#still').click(function(){
socket.emit('snap');
});
</script>
</body>
</html>