modifié: superTornado.py
modifié: v/video.html
This commit is contained in:
parent
bbd59adfde
commit
19d6c72378
@ -121,7 +121,7 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
|
||||
def send_image(self) :
|
||||
try :
|
||||
socket.setdefaulttimeout(5)
|
||||
f = urlopen('http://test:a@192.168.0.13/image.jpg?cidx=791836195')
|
||||
f = urlopen('http://test:a@192.168.1.13/image.jpg?cidx=791836195')
|
||||
data = f.read()
|
||||
encoded = base64.b64encode(data)
|
||||
self.write_message(encoded)
|
||||
|
@ -6,7 +6,7 @@
|
||||
<title>Acces camera</title>
|
||||
<script src="js/jquery-2.1.0.min.js"></script>
|
||||
<script >
|
||||
var ws = new WebSocket ("ws://192.168.1.23/socket");
|
||||
var ws = new WebSocket ("ws://192.168.1.12/socket");
|
||||
ws.onmessage = function (evt) {
|
||||
console.log("data receive");
|
||||
if(evt.data != "error") {
|
||||
|
Reference in New Issue
Block a user