renommé: fichier/autorise -> m/fichier/autorise
renommé: fichier/conf -> m/fichier/conf renommé: fichier/log -> m/fichier/log renommé: loadConf.py -> m/loadConf.py renommé: login.py -> m/login.py modifié: superTornado.py renommé: illegal.html -> v/illegal.html renommé: images/iut.jpg -> v/images/iut.jpg renommé: index.html -> v/index.html renommé: js/jquery-2.1.0.min.js -> v/js/jquery-2.1.0.min.js renommé: style/styles.css -> v/style/styles.css renommé: video.html -> v/video.html
This commit is contained in:
47
v/video.html
Normal file
47
v/video.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<link rel="stylesheet" type="text/css" href="style/styles.css">
|
||||
<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");
|
||||
ws.onmessage = function (evt) {
|
||||
console.log("data receive");
|
||||
if(evt.data != "error") {
|
||||
console.log("data OK !");
|
||||
var str = "<img src='data:image/jpeg;base64,"+evt.data+"'>";
|
||||
}
|
||||
else {
|
||||
console.log("data NOK !");
|
||||
var str = "<p>Erreur : image camera indisponible</p>";
|
||||
}
|
||||
$('.image').html(str);
|
||||
}
|
||||
ws.onopen = function () {
|
||||
console.log("websocket engage");
|
||||
};
|
||||
ws.onclose = function () {
|
||||
console.log("connection closed");
|
||||
};
|
||||
window.onbeforeunload=function(){
|
||||
ws.close();
|
||||
};
|
||||
function refresh() {
|
||||
console.log("Data send");
|
||||
ws.send("lol");
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="javascript:setInterval('refresh();',2000)">
|
||||
<h2>Vue camera</h2>
|
||||
<div class="image"></div>
|
||||
<form action="/disconnection" method="post">
|
||||
<input type="submit" value="Deconnexion">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user