This is the main reason most of us have a webcam - to setup
a webpage where visitors cam umm... observe us. *grin*
Anyway, I'm guessing I'm not the only one who doesn't have
the processingpower needed to provide more than 1 fps or
choose to have "slow" updates for any other reason.
The solution would then be either to have user to refresh the
webpage manually or include a meta-refresh tag, so that the
page reloads automagicaly. Well, I thought about it and
found that refreshing the whole page is too slow (especially
if you include the picture in some large webpage, like me http://www.df.lth.se/~ryssen/mysite/main.html\).
So I've written a simple javascript that will reload the picture
only. If anyone is interested, I'll put it up online.
Cheers!
// Storm
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Or, you can just use this script (provided it displays properly). You probably want to set the refresh time to a little less than you have the server refreshing at.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
one last thing, you need to change cam/webcam.jpg to the location of your image file, and you need to add name="myCam" to your <img src="cam/webcam.jpg"> tag, so it would look like:
<img src="picture/location.jpg" name="myCam">
and onLoad=" setTimeout('refreshIt()',900)" to the body tag - so it's like this:
<body onLoad=" setTimeout('refreshIt()',900)">
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is the main reason most of us have a webcam - to setup
a webpage where visitors cam umm... observe us. *grin*
Anyway, I'm guessing I'm not the only one who doesn't have
the processingpower needed to provide more than 1 fps or
choose to have "slow" updates for any other reason.
The solution would then be either to have user to refresh the
webpage manually or include a meta-refresh tag, so that the
page reloads automagicaly. Well, I thought about it and
found that refreshing the whole page is too slow (especially
if you include the picture in some large webpage, like me
http://www.df.lth.se/~ryssen/mysite/main.html\).
So I've written a simple javascript that will reload the picture
only. If anyone is interested, I'll put it up online.
Cheers!
// Storm
Or, you can just use this script (provided it displays properly). You probably want to set the refresh time to a little less than you have the server refreshing at.
Forgot to paste it, here it is:
<script language="JavaScript"><!--
function refreshIt() {
if (!document.images) return;
document.images['myCam'].src = 'cam/webcam.jpg?' + Math.random();
setTimeout('refreshIt()',900); // refresh every .9 secs
}
//--></script>
one last thing, you need to change cam/webcam.jpg to the location of your image file, and you need to add name="myCam" to your <img src="cam/webcam.jpg"> tag, so it would look like:
<img src="picture/location.jpg" name="myCam">
and onLoad=" setTimeout('refreshIt()',900)" to the body tag - so it's like this:
<body onLoad=" setTimeout('refreshIt()',900)">