Trying to control a webcam

I am trying to control a DLink DCS-900 (securicam)

I can get the camera running within HTML using the following code:
**************
<html>
<center>
<BODY scroll="no">
        <APPLET name="cvcs" CODEBASE="http://206.12.4.38:80/" CODE="xplug.class" WIDTH=320 HEIGHT=240>
          <param name="RemotePort" value=80>
          <param name="Timeout" value=5000>
          <param name="RotateAngle" value=0>
          <param name="PreviewFrameRate" value=2>
          <param name="DeviceSerialNo" value="bWNyZW5zaGE6MkR0VWlJ">
        </APPLET>
*********************

But what I'd like to do is be able to tell when i is connected or not, since it takes a long time to load sometimes, I don't know if it's being slow, or actually disconnected.

IE, Id like the screen to show either "Loading..." or "Disconnected" untill the webcam pops up.

Any leads into how I might be able to do this would be awesme.


Here's the small bit of code D-link provides:
http://support.dlink.com/faq/view.asp?prod_id=1871&question=DCS-1000%20/%20DCS-1000W%20/%20DCS-900%20/%20DCS-900W

     
galneweinhawAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

blainesCommented:
Unless you have the Java source code, you can't modify any "Loading" prompt or "Disconnected" inside the Java Applet.
0
blainesCommented:
I use some software installed on my local machine to stream my webcam, none of this "REFRESH" every few seconds, but real streaming. The downside is the software I use is not free.

You can get it here for $39.95:
http://surveyor.com/

It's awesome, I use it and it streams GREAT!!! I'll even post the code I use to stream. It has a stop and start functionality. And you can also provide an image to be displayed when you are offline/disconnected. It's great stuff.



-----------------------------------------------------------------------------------
<html>
<HEAD>
<TITLE>Web Cam</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<BODY BGCOLOR=#000000>

<div align="center">
            
<script LANGUAGE="JavaScript">
<!--
browserType = navigator.appName;            
newImage = new Image();
document.onstop = document_onstop;

function startstop_onclick()
{
      if (startstop.value == "-- click here to STOP the cam --")
      {
            stopLoad();
      }
      else
      {
            startstop.value = "-- click here to STOP the cam --";
            newImage.onload=loadNewImage;
            loadNewImage();
      }
}

function document_onstop()
{
      stopLoad();
}

function stopLoad()
{
      newImage.onload="";      
      startstop.value = "-- click here to START the cam --";
      window.status = "Live video stopped ...";
}

function loadNewImage()
{
    uniq = new Date();
    uniq = uniq.getTime();
    document.images.webcam32.src=newImage.src;
    newImage.src="http://127.0.0.1:8888/video/pull?"+uniq;
    window.status = "Displaying live video ...";    
}
function initialImage()
{
      uniq = new Date();
      uniq = uniq.getTime();
      newImage.onload=loadNewImage;
      newImage.src="http://http://127.0.0.1:8888/video/pull?"+uniq;
    document.images.webcam32.onload="";
}

function imageError()
{
      window.status = "Sorry ... we're not online right now";
      image = document.images.webcam32;
      image.onload = "";
      image.onerror = "";
      startstop.disabled = true;
      document.images.webcam32.src = "/images/spacer.gif";
}

if (browserType == "Netscape")
{
      document.write('<IMG SRC="http://http://127.0.0.1:8888/video/push" width=320 height=240>');
}
else
{
      document.write('<IMG SRC="http://http://127.0.0.1:8888/video/pull" name=webcam32 onload="initialImage()" onerror="imageError()" width=320 height=240>');
}
//-->
</script><br><INPUT id=startstop type=button value="-- click here to STOP the cam --" LANGUAGE=javascript onclick="return startstop_onclick()"></div>
</BODY>
</html>
-----------------------------------------------------------------------------------
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
blainesCommented:
I forgot to add. The code I posted above will only work if you have the WebCam32 software installed.

http://surveyor.com/

BTW, I don't work for or get paid for this, I'm just posting what I personally use since it does exactly what you are trying to do.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

galneweinhawAuthor Commented:
Thanks for the help!

Is there any way I can confirm this will work with my particular webcam?
0
blainesCommented:
Not sure how to confirm, however, this program has worked on 4 different web cams I've owned. This program also detected my TV Tuner card which allowed me to broadcast a television show through my web cam site. I feel very confident it'll work for your web cam.

Here is how you can be sure:
http://surveyor.com/support/webcam32help/multimedia.html
0
PreachDotNetCommented:
Windows Media Services 9 is free and can stream audio, movies, or live cam over the web.  

http://www.microsoft.com/windows/windowsmedia/9series/server.aspx

Its very easy to set up and works a treat.  Handles buffering etc for you.  I guarantee you'll have it up and running in an hour.
0
blainesCommented:
I was unable to find out how to set up the M$ Media server to stream to my web cam site. Where do I get the Java or HTML code to make this stream work? I'm interested in testing it.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.