Click here to Skip to main content
15,922,407 members

Comments by Kev45 (Top 2 by date)

Kev45 19-Feb-14 4:43am View    
Thanks anyway.
Kev45 18-Feb-14 9:03am View    
Hello.

There isn't much more code I can give you. Yes, it is C#.

<pre lang="c#">
string camIP = string.Empty;

CameraIframe.Attributes["src"] = string.Empty;

if (!string.IsNullOrEmpty(TerminalLinkedDropDownList.FirstLevelChildCvKey))
{
foreach (var ip in CamIPs.Value.Split('|'))
{
if (ip.Split('-')[0] == TerminalLinkedDropDownList.FirstLevelChildCvKey)
{
camIP = ip.Split('-')[1];
}
}

if (!string.IsNullOrEmpty(camIP))
{
CameraHiddenFieldfps.Value = ConfigurationManager.AppSettings["CameraFps"].ToString();
CameraHiddenFieldcompression.Value = ConfigurationManager.AppSettings["CameraCompression"].ToString();

NameValueCollection myParamsCollection = (NameValueCollection)ConfigurationManager.GetSection("secureAppSettings");
CameraHiddenFieldUsername.Value = myParamsCollection["CameraUsername"];
CameraHiddenFieldPassword.Value = myParamsCollection["CameraPassword"];

CameraIframe.Attributes["src"] = @"http://" + CameraHiddenFieldUsername.Value + ":" + CameraHiddenFieldPassword.Value + "@" + camIP + @"/axis-cgi/mjpg/video.cgi?fps=" + CameraHiddenFieldfps.Value + "&compression=" + CameraHiddenFieldcompression.Value + "&resolution=320x240&text=0&date=0&clock=0&v=" + DateTime.Now.ToLongTimeString();

}
}
</pre>

I didn't write the original code. The person has left. All I can see is that the code connects the URL to the src attribute of the image control. It is a live web cam feed. So is open all the time.

When the "Take image" button is clicked, it does a page load, and again connects the url to the src attribute of the image control, so that we have the live web cam feed.