In the file /.yawcam/update.html there is no code to update the web page. So it just loads 1 static pic and stops. I added this, which refreshes just the pic not the whole page. by changing the var n, you can dynamically change the FPS
//Add id='pic' to the <img that holdsthe image. And add the js
<script type="text/javascript">
var n=1000 // will work as low as 100. in msec.
function refresh(){
document.images["pic"].src="out.jpg"
setTimeout("refresh()",n)
}
setTimeout("refresh()",1000)
</script>
HTTP does not refresh
Re: HTTP does not refresh
Doesn't the image get updated when the page reloads?
What web browser are you using?
It works fine for me in the browsers I've tried:
In windows:
Chrome, Firefox, Opera, Internet Explorer
In OSX:
Safari
In Android:
Chrome
In iOS:
Safari
Chrome
/malun
What web browser are you using?
It works fine for me in the browsers I've tried:
In windows:
Chrome, Firefox, Opera, Internet Explorer
In OSX:
Safari
In Android:
Chrome
In iOS:
Safari
Chrome
/malun
-
- Posts: 30
- Joined: Fri Feb 15, 2013 6:47 pm
Re: HTTP does not refresh
The image refreshes now I have some code to refresh. Problem was there was nothing to refreah the page. The code I added (above) has the advantage of just refreshing the img so there is no page flicker (as occures sometimes when refreshing the whole page), and if the page has a lot of other stuff on it, that will not get reloaded n x per sec (keeps the Kbps down and enables a [marginally] faster refresh rate)
-
- Moderator
- Posts: 1210
- Joined: Wed Jan 14, 2009 3:50 am
Re: HTTP does not refresh
My update.html page has "<meta http-equiv=Refresh content="10">" to refresh every 10 seconds.
Re: HTTP does not refresh
Ah, yep. To get the javascript update: Use the stream output (and you can set it to 1 FPS if you want to).
/malun
/malun
-
- Posts: 1
- Joined: Sun Mar 19, 2023 5:24 am
Re: HTTP does not refresh
I am new to javascript editing, am I missing where this update goes?
I can view my camera one image at a time and refresh the page to see the updates.
I have it working local and remotely, but it will not automatically refresh the image unless I reload the page.
Unfortunately with my setup, it took me the better part of about 5 hours to get to this point. (No thanks to a cheaper router that needed OpenWRT installed and setup to get port forwarding working correctly)
Any help will be greatly appreciated!
Thanks!
I can view my camera one image at a time and refresh the page to see the updates.
I have it working local and remotely, but it will not automatically refresh the image unless I reload the page.
Unfortunately with my setup, it took me the better part of about 5 hours to get to this point. (No thanks to a cheaper router that needed OpenWRT installed and setup to get port forwarding working correctly)
Any help will be greatly appreciated!
Thanks!