modifié: superTornado.py
modifié: video.html
This commit is contained in:
parent
f769e3e1ea
commit
033a7dce2b
@ -125,7 +125,7 @@ application = tornado.web.Application([
|
|||||||
(r"/video", VideoHandler),
|
(r"/video", VideoHandler),
|
||||||
(r"/unauthorized", UnauthorizedHandler),
|
(r"/unauthorized", UnauthorizedHandler),
|
||||||
(r"/disconnection", DisconnectionHandler),
|
(r"/disconnection", DisconnectionHandler),
|
||||||
(r"/test", WSocketHandler),
|
(r"/socket", WSocketHandler),
|
||||||
], cookie_secret="1213215656")
|
], cookie_secret="1213215656")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<title>Acces camera</title>
|
<title>Acces camera</title>
|
||||||
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
|
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
|
||||||
<script type="text/javascript" >
|
<script type="text/javascript" >
|
||||||
var ws = new WebSocket ("ws://192.168.1.23/test");
|
var ws = new WebSocket ("ws://192.168.1.23/socket");
|
||||||
ws.onmessage = function (evt) {
|
ws.onmessage = function (evt) {
|
||||||
console.log("data receive");
|
console.log("data receive");
|
||||||
var str = "<img src='data:image/jpeg;base64,"+evt.data+"'>";
|
var str = "<img src='data:image/jpeg;base64,"+evt.data+"'>";
|
||||||
|
Reference in New Issue
Block a user