-
-
Save virgilvox/7abd0eb2c687ada4af2f to your computer and use it in GitHub Desktop.
oculuss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>MJPG-Streamer - Stream Example</title> | |
</head> | |
<link type="stylesheet" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> | |
<body> | |
<div class="container"> | |
<div class="row"> | |
<div class="well-lg"> | |
<canvas id="oculusCanvas" height="600" width="600"> | |
</canvas> | |
</div> | |
</div> | |
</div> | |
<!-- | |
<style type="text/css"> | |
table { | |
border-spacing: 0; | |
border-collapse: collapse; | |
} | |
td { | |
padding:0px; | |
} | |
td img { | |
display:block; | |
} | |
</style> | |
<center> | |
<table width="100%" cellspacing="0" style="border-spacing: 0;"> | |
<tr> | |
<td width="50%" > | |
<div> | |
<img src="http://raspberrypi.local:8080/?action=stream" /></div> | |
</td> | |
<td width="50%" > | |
<div style="line-width:0px;"><img src="http://raspberrypi.local:8080/?action=stream" /></div> | |
</td> | |
</tr> | |
</table> | |
</center> --> | |
<script type="text/javascript"> | |
var canvas = document.getElementById('oculusCanvas'); | |
var context = canvas.getContext('2d'); | |
var imageObj = new Image(); | |
imageObj.onload = function() { | |
context.drawImage(imageObj, 0, 0); | |
}; | |
imageObj.src = 'http://raspberrypi.local:8080/?action=stream'; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment