modifié: superTornado.py
modifié: video.html
This commit is contained in:
parent
f8cbf2c9ce
commit
b172309e14
@ -95,6 +95,17 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
|
||||
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")'
|
||||
print "->Authorized user access"
|
||||
|
||||
try :
|
||||
socket.setdefaulttimeout(5)
|
||||
f = urlopen('http://test:a@192.168.0.13/image.jpg?cidx=791836195')
|
||||
data = f.read()
|
||||
encoded = base64.b64encode(data)
|
||||
self.write_message(encoded)
|
||||
except Exception, e :
|
||||
print e
|
||||
self.write_message("error")
|
||||
|
||||
|
||||
def on_message(self,mesg):
|
||||
print "->Data receive"
|
||||
try :
|
||||
|
@ -19,7 +19,7 @@ return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});v
|
||||
}
|
||||
else {
|
||||
console.log("data NOK !");
|
||||
var str = "<p>Erreur : image camera indisponilbe</p>";
|
||||
var str = "<p>Erreur : image camera indisponible</p>";
|
||||
}
|
||||
$('.image').html(str);
|
||||
}
|
||||
|
Reference in New Issue
Block a user