Quote:
Originally Posted by Alan-Hart
This JavaScript will load new images from a 640 × 480 webcam as fast as your connection (or the server's) can supply them, without caching problems. It requires the "document.images" object, though could easily be updated for more modern DOMs by using document.getElementWithId(). You mean document.getElementById().
<script type="text/javascript" language="JavaScript">
newImage = new Image();
function LoadNewImage()
{
var unique = new Date();
document.images.webcam.src = newImage.src;
newImage.src = "http://path/to/webcam.jpeg?time=" + unique.getTime();
}
function InitialImage()
{
var unique = new Date();
newImage.onload = LoadNewImage;
newImage.src = "http://path/to/webcam.jpeg?time=" + unique.getTime(); document.images.webcam.onload="";
}
</script>
<img src="http://path/to/webcam.jpeg" name="webcam" onload="InitialImage()" width="640" height="480">
|
May be that script is good enough, but is it crossbrowser compatible?
Good starting point.