Page 1 of 1

webcam

Posted: Wed Jul 17, 2019 6:20 am
by sieweb
Hi and good morning,
I think, this is not WB related, but I try to ask here anyway:
I am just building a new site to replace an older, non rersponsive one.
There is a webcam. The picture is placed as I-frame with the address pointing direct to the jpg at the server.
With the old site no problem:
http://bergfried.net/html/webcam.html
I did the same with WB.
http://siehorst.de/bergtest/webcam.html
When calling from my desktop I will see the correct up to date picure, but if I use my mobile devices, an older version of the pic will be displayed. Refreshing is no help.
At the above right corner is a time / date stamp, the pic will be refreshed every minute.
Any ideas?
Thank you, horst
p.s.: Yes we konw, the front protection glas of the cam has to be cleaned :D

Re: webcam

Posted: Wed Jul 17, 2019 6:42 am
by Pablo
Your old website does not use an inline frame but a standard image.
Although I do not think this will make any difference, you can try to use a standard image in WWB as well.

Re: webcam

Posted: Wed Jul 17, 2019 7:54 am
by sieweb
Ups, you are true :( . That has been in an older version of the site. Too long ago.
Standard image or picture isn't supporting live webadresses for pictures. If I paste the link it will download the pic locally.
But I think I found a method, will see.

Re: webcam

Posted: Wed Jul 17, 2019 8:49 am
by Pablo
You can also use an absolute link in the Image object. Just copy the URL in the filename field.

Re: webcam

Posted: Wed Jul 17, 2019 7:57 pm
by sieweb
Pablo wrote: Wed Jul 17, 2019 8:49 am ... Just copy the URL in the filename field.
Mstery :-) : I tried that alaready but did work in the way I described (just locally download).
But now the url is loading the pic, strange.
But the initial described problem is remaining: with the desktop I get the actual valid picture, with the handy an old version of the pic will be displayed.
I will try a dedicated refresh button.
horst

Re: webcam

Posted: Wed Jul 17, 2019 8:21 pm
by Pablo
I think this is related to the cache of the browser.
WWB has no control over the image, because it is loaded from the server.

Re: webcam

Posted: Thu Jul 18, 2019 7:20 am
by sieweb
Sadly even a 'refresh' button does not work :(

Re: webcam

Posted: Sun Jul 21, 2019 1:10 pm
by sieweb
Hi again,
has anyone an idea how to get it running that a server saved webam picture will be displayed not only with dektop but with mobile devices?
On a mobile the browsers are refusing to load a fresh image from the server but will display an old version.
horst

Re: webcam

Posted: Sun Jul 21, 2019 1:22 pm
by Pablo
I do not think this has anything to do with WWB.
The software does not do anything with the image It is just a reference to the image on the server.

Re: webcam

Posted: Sun Jul 21, 2019 1:48 pm
by sieweb
Yes Pablo, I know, but maybe here is someone around who knows how to get a result.
I can't imagine, that I am the only one how is implementing a webcam :)
horst

Re: webcam

Posted: Sun Jul 21, 2019 3:46 pm
by BaconFries
I can't imagine, that I am the only one how (who) is implementing a webcam
From the lack of replies you may be the only one. Now I don't have experience with this but have you tried using the following

Code: Select all

<meta http-equiv="refresh" content="15"/>
<meta http-equiv="expires" content="0"/>
or

Code: Select all

<script type="text/javascript">
// <![CDATA[
var refreshrate = 30;          // seconds between refresh
var image       = "http://yourwebsite.co.uk/webcampicture.jpg";    // image name
var imgwidth    = 640;        // image width
var imgheight   = 480;        // image height
var imgalt      = "WebCam Image";
var imgtitle    = "header=[WebCam Image] body=[WebCam Image Automatically Updated Every 30 Seconds] delay=[1000]";
function refresh() { document.images["pic"].src = image + "?" + new Date(); setTimeout('refresh()', refreshrate * 1000); }
document.write('<img src="' + image + '" alt="' + imgalt + '" title="' + imgtitle + '" name="pic" id="pic" width="' + imgwidth + '" height="' + imgheight + '" style="border: none;" />');
if(document.images)window.onload=refresh;
// ]]>
</script>
Source of the above.
https://cumulus.hosiene.co.uk/viewtopic.php?t=15374
As mentioned I don't have experience with using a webcam in web pages so cannot say if any of the above will work.

Re: webcam

Posted: Sun Jul 21, 2019 7:18 pm
by sieweb
BaconFries wrote: Sun Jul 21, 2019 3:46 pm ... you may be the only one.
Buuhhhähhh, yes I am :-)
Thank you for your efforts, but as you argued, it does not work. 'refresh' is not a suitable command. I recognize the refresh of the page, but the pic still remains.
Ir I find an answer, I will report.
horst

Re: webcam

Posted: Thu Jul 25, 2019 9:53 am
by sieweb
A little update:
On Android: Firefox is updating the picture on manual and local 'Load new' command.
Chrome is refusing, but not only with the webcam picture but with others too if changed.
On Apple devices it seem to be uneven.
horst