Use the below example code to view the streaming video from your DCS-3410 on your webpage. If the camera is behind a NAT device such as a router, the IP must be edited to reflect the public address of the router. In this example the public IP address of the router is 67.130.140.129 and the port used to access the camera publicly is 80. You will also need to edit the username and password for the remote connection by editing in the fields UserName and Password. In this example the UserName is username and the Password is password
<HTML>
<HEAD>
<TITLE>IPCamera ActiveX Control Sample</TITLE>
<script language="javascript">
function StartStreaming()
{
//Connect to the camera.
//The value 0:both audio and video streaming, 1:only video streaming, 2:only audio streaming.
dcs.LiveStreamIn(0);
}
</script>
</HEAD>
<BODY>
<script language="javascript">
document.write("<OBJECT ID=\"dcs\" CLASSID=\"CLSID:721700FE-7F0E-49C5-BDED-CA92B7CB1245\" ");
document.write(" codebase=\"/dcsclictrl.cab #Version=1,0,0,2125\" ");
document.write(" style=\"WIDTH: 640; HEIGHT:480;\">");
document.write(" </OBJECT>");
//set URL
dcs.RemoteHost="67.130.140.129";
dcs.RemotePort=80;
//set proxy to follow IE Proxy setting.
dcs.Proxy=dcs.GetIEProxy();
dcs.ProxyPort=dcs.GetIEProxyPort();
dcs.SpecifiedBypass=dcs.GetIESpecifiedBypass();
dcs.UseBypass(dcs.GetIEBypassEnable());
dcs.UseProxy(dcs.GetIEProxyEnable());
//set username and password
dcs.Username="username";
dcs.Password="password";
//Specify which profile of video acquired by the object. Typically, there are 4 profiles in a multi-profile camera.
//dcs.ProfileID="1";
//Specify the stream type of the assigned profile. Possible value are: 0:MPEG4, 1:MJPG, 2:H.264.
//User should check the stream type of each profile before connect it.
//dcs.SetStreamType(0);
// Start video stream
window.setTimeout(´StartStreaming()´, 1000);
</script>
</BODY>
</HTML>