index.html~ 2.46 KB
<html>
	<head>
		<link rel="stylesheet" href="Design_web_final.css" /> 
		<title>
			Projet SC IMA3 2017 : P4
		</title>
		<script src="jquery.js"></script>
			    <script type="text/javascript">
					window.WebSocket=(window.WebSocket||window.MozWebSocket);

					var websocket=new WebSocket('ws://localhost:9000','myprotocol');

					websocket.onopen=function(){ $('h1').css('color','green'); };

					websocket.onerror=function(){ $('h1').css('color','red'); };

					websocket.onmessage=function(message){
					console.log(message.data);
					$('#messages').append($('<p>',{ text: message.data }));
					};

					function sendhaut(){
						websocket.send('h');
					}
					function senddroite(){
						websocket.send('d');
					}
					function sendbas(){
						websocket.send('b');
					}
					function sendgauche(){
						websocket.send('g');
					}
					function sendup(){
						websocket.send('u')
					}
			    </script>
	</head>
	<body onkeydown="if(event.keycode==38)sendhaut()"
 onkeyup="if(event.keycode==38)sendup()">	
 	<center>
 		<h1>
 			Projet SC IMA3 | Groupe 4 : Camera IP
 		</h1>
 	</center>
	<div id="vetb">	<!-- video + boutons -->	
				<div>
						<center>
							<img src="http://192.168.2.20:8081/?action=stream" /><!-- Pour afficher en streaming -->
						</center>
				</div>	
				<div id="btous"> <!-- boutons -->
					<div id="bgdh"> <!-- boutons gauche droite haut -->
						<div>
							<button class="element" onmousedown="sendgauche()" onmouseup="sendup()" alt="" style="background:white;">
								<img src="fleche_gauche2.jpg" style="width:50px;">
							</button>
						</div>
						<div>
								<button class="element" onmousedown="sendhaut()" onmouseup="sendup()" alt="" style="background:white;">
										<img src="fleche_haut2.jpg" style="width:50px;">	
								</button>
								
						</div>
						<div>
							<button class="element" onmousedown="senddroite()" onmouseup="sendup()" alt="" style="background:white;">
										<img src="fleche_droite2.jpg" style="width:50px;">	
							</button>
						</div>
					</div>
					<div><!-- bouton bas -->
		
							<button class="element" onmousedown="sendbas()" onmouseup="sendup()" alt="" style="background:white;">
										<img src="fleche_bas2.jpg" style="width:50px;">	
							</button>
					
					</div>	 

				</div>	
				
	</div>
	<p>
		Carlier Henri<br>
		Djeraba Taky<br>
		Boens Quentin<br>
		Hubert Thomas
	</p>


</html>