Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Thanked 0 Times in 0 Posts

    Image update blinking HELP PLEASE

    Hi Community,

    I am running simple web cam streaming to html. Let me explain how it works:
    First C code grabs frame from web cam and PHP code send the image to the client where exists receiver php code. It saves the submitted image to disk and javascript updates image every 0.1 sec or less. it is working fine but there is blinking. So I changed Javascript to avoid blinking (changed to other script). In this case streaming is fine but after 2-5 sec it stops updating. here is script:

    <title> Streaming</title>
    <!-- <img name="frame" src="" border="0" /> -->

    <img src="" id="webcam1" width="640" height="480" border="5" alt="Camera1"/>

    <script language="javascript">

    document.images.webcam1.src = "http://my_IP_address/img.jpg";
    document.images.webcam1.onload = Start;

    function LoadImage()
    uniq1 = Math.random();
    document.images.webcam1.src = "http://my_IP_address/img.jpg?"+uniq1;
    document.images.webcam1.alt = uniq1;

    function Start()
    setTimeout("LoadImage();", 70);


    Where is mistake? Why it stops updating after 2-5 seconds every time.

    Please help!

    Thank you
    Last edited by elikpr; 09-04-2011 at 07:00 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts