Skip to main content
ivan_den_grusomme
Participant
March 16, 2019
Answered

Refresh webcam every 3 minutes

  • March 16, 2019
  • 1 reply
  • 491 views

Hi.

Sorry for my terrible English.

I need to refresh this video every 3 minute, but cant find this in Dreamweaver.
I can refresh the whole page, but I don't want this.

The webcam is streaming 3 minutes and the stop, I have to refresh the page to get it going again.

This is the code for the wemcam:

   <table width="98%" border="0">

      <tr>

        <td align="center">My bird nest webcam     </td>

        <td> </td>

      <td align="center"><p>   Live webcam from my aquarium</p></tr>

      <tr>

        <td width="512" height="277"><table width="362" height="274" border="5" align="center">

            <tr align="left">

            <td width="344" height="260"><img src="http://192.168.10.10:8080/cam_1.cgi" alt="Bird Cam" name="BirdCam" width="362" height="256" class="webcam" id="BirdCam" onmousedown="PTZMouseDown1(event)" /></td>

          </tr>

Tanks for any tips

Ivan Vågenes

Norway

This topic has been closed for replies.
Correct answer Paul-M

Try something like this in the head of your document:

<script>

function RefreshCam(){

    var d = new Date();

    var t = d.getTime();

    document.getElementById('BirdCam').src = "http://192.168.10.10:8080/cam_1.cgi?"+t;

}

var reloadcam = setInterval("RefreshCam()",180000);

</script>

1 reply

Paul-MCorrect answer
Legend
March 16, 2019

Try something like this in the head of your document:

<script>

function RefreshCam(){

    var d = new Date();

    var t = d.getTime();

    document.getElementById('BirdCam').src = "http://192.168.10.10:8080/cam_1.cgi?"+t;

}

var reloadcam = setInterval("RefreshCam()",180000);

</script>

Paul-M - Community Expert
ivan_den_grusomme
Participant
March 17, 2019

Hi.

Tanks for the code.

It worked perfect.

Ivan

Legend
March 17, 2019

You are welcome

Paul-M - Community Expert