Embedding live shot from the DCS-2100 into a web page
Embedding live shot from the DCS-2100 into a web page
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.
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:
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.
The following code does it for me:
Code: Select all
<div align="center">
<script language="JavaScript">
<!--
if ((navigator.appName == "Microsoft Internet Explorer")&&(navigator.platform != "MacPPC"))
{
document.write("<OBJECT ID=\"VACtrl\" WIDTH=330 HEIGHT=270");
document.write(" CLASSID=CLSID:A93B47FD-9BF6-4DA8-97FC-9270B9D64A6C");
document.write(" CODEBASE=\"http://user:pwd@camera_host:port/plugin/h263ctrl.cab#version=1,7,0,1\">");
document.write("<PARAM NAME=\"Url\" VALUE=\"http://user:pw@[i]camera_host:port[/i]/cgi-bin/video.vam\">");
document.write("<PARAM NAME=\"VSize\" VALUE=\"CMS\">");
document.write("<PARAM NAME=\"RemoteIP\" VALUE=\"camera_host\">");
document.write("<PARAM NAME=\"RemotePort\" VALUE=\"5001\">");
document.write("<PARAM NAME=\"RemoteID\" VALUE=\"23838\">");
document.write("<PARAM NAME=\"DisplayTimeFormat\" VALUE=\"1\">");
document.write("<PARAM NAME=\"DigitalZoomEdit\" VALUE=\"false\">");
document.write("<PARAM NAME=\"Language\" VALUE=\"EN\">");
document.write("</OBJECT>");
}
//-->
</script>
</div>
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.
HTTP Warning
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!!!
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!!!
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!
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
![Sad :-(](./images/smilies/icon_sad.gif)