Embedding live shot from the DCS-2100 into a web page

Question and comments on the D-Link DCS-2100+ Internet Camera
Post Reply
Andrew

Embedding live shot from the DCS-2100 into a web page

Post by Andrew »

Can you tell me if you've been able to embed a live shot from the camera into a web page that you custom created yourself? If so, were you able to get rid of the warning window that tells people that the camera is being switched to HTTP mode? Thanks for your help.
david
Site Admin
Posts: 164
Joined: Wed Jan 28, 2004 4:21 pm

Post by david »

Yes, I have live video from the camera in my own web page. The solution is very low tech however, and exposes username and password in the source. As such, I am using it on a protected page accessible by family members only.

The following code does it for me:

Code: Select all

<div align="center">
<script language="JavaScript">
<!--
      if &#40;&#40;navigator.appName == "Microsoft Internet Explorer"&#41;&&&#40;navigator.platform != "MacPPC"&#41;&#41;
      &#123;		
        document.write&#40;"<OBJECT ID=\"VACtrl\" WIDTH=330 HEIGHT=270"&#41;;
        document.write&#40;" CLASSID=CLSID&#58;A93B47FD-9BF6-4DA8-97FC-9270B9D64A6C"&#41;;
        document.write&#40;" CODEBASE=\"http&#58;//user&#58;pwd@camera_host&#58;port/plugin/h263ctrl.cab#version=1,7,0,1\">"&#41;;
        document.write&#40;"<PARAM NAME=\"Url\" VALUE=\"http&#58;//user&#58;pw@&#91;i&#93;camera_host&#58;port&#91;/i&#93;/cgi-bin/video.vam\">"&#41;;
        document.write&#40;"<PARAM NAME=\"VSize\" VALUE=\"CMS\">"&#41;;
        document.write&#40;"<PARAM NAME=\"RemoteIP\" VALUE=\"camera_host\">"&#41;;
        document.write&#40;"<PARAM NAME=\"RemotePort\" VALUE=\"5001\">"&#41;;
        document.write&#40;"<PARAM NAME=\"RemoteID\" VALUE=\"23838\">"&#41;;
        document.write&#40;"<PARAM NAME=\"DisplayTimeFormat\" VALUE=\"1\">"&#41;;
        document.write&#40;"<PARAM NAME=\"DigitalZoomEdit\" VALUE=\"false\">"&#41;;
        document.write&#40;"<PARAM NAME=\"Language\" VALUE=\"EN\">"&#41;;
        document.write&#40;"</OBJECT>"&#41;;
		      &#125;
//-->
</script>
</div>
This code however depends on the firmware of your camera. The best way is to copy the code the camera produces on it's on web camera page and paste this to your web page.

About the "Switching to HTTP". This depends on the clients network set-up and as such you cannot control it. If the client is not behind any (corporate) firewalls, he/she should be able to use UDP and get best quality.

If a firewall blocks the connection, the client will try to switch to HTTP as a last resort.

In the camera admin, if you set up connection mode to HTTP only for the web user that will be using the live feed, the warning should go away.

d.
Andrew

HTTP Warning

Post by Andrew »

Thanks for your quick response. All of what you've suggested, I already tried to no avail. Setting the camera specifically to HTTP was the first thing I tried, which is why I got stumped about seeing such a warning. At least it confirms that I was going down the right track with it.

One difference I noted in your code is that you included the port number with the IP address. Do you think that might play a role? If not, do you have any other suggestions.

Many thanks!!!
david
Site Admin
Posts: 164
Joined: Wed Jan 28, 2004 4:21 pm

Post by david »

I have included port number because I am using my web camera on other port than 80.

Also, I would recommend creating a new user that would be using the live feed. Log in first time via the web camera and set connection method to HTTP. Next time the live feed is accessed via your external page I would have thought the HTTP would be selected.

By creating a specific web user for including the live feed in an external page will also let you avoid putting in administrative password.

The live feed and the FTP functionality of the camera is a bit flaky. Not something I would have expected from a commerical product :-( But I guess we are stuck with it!
Post Reply