Has anyone figured out how to retrieve and/or upload a current jpeg from a camera that is constantly recording.
I want to place an image on a webpage that updates every 30 seconds or so. I haven't been able to figure out how to write a script that will give me the most recent jpeg image that was captured by the camera.
Retrieve current JPEG from camera that is recording
-
- Posts: 4
- Joined: Mon Sep 05, 2011 8:49 pm
Re: Retrieve current JPEG from camera that is recording
In html5 supposing that you have an http stream you could do something like that
<canvas id="myCanvas" width="578" height="400"></canvas>
<script>
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var imageObj = new Image();
imageObj.onload = function() {
context.drawImage(imageObj, 69, 50);
};
imageObj.src = 'http://192.168.1.60:8080/video.mpg';
</script>
<canvas id="myCanvas" width="578" height="400"></canvas>
<script>
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var imageObj = new Image();
imageObj.onload = function() {
context.drawImage(imageObj, 69, 50);
};
imageObj.src = 'http://192.168.1.60:8080/video.mpg';
</script>