0
Answer

Capturing Image from webcam

Ask a question
hi friends,
 
Actually I am trying to capture photo from web cam and save the data  into database. When I try to host and checking in server it is working in desktops,but when we checking in laptop device it is not working while capturing the image i use jquery and ajax below is the code.
function UploadPic() {
debugger;
// generate the image data
var canvas = document.getElementById("canvas");
var dataURL = canvas.toDataURL("image/png");
// Sending the image data to Server
$.ajax({
type: 'POST',
url: "baseimg.aspx",
data: { imgBase64: dataURL },
success: function () {
alert("Done, Picture Uploaded.");
window.opener.location.reload(true); // reloading Parent page
window.location.href = "http://www.kelogin.com/IFR/Data.aspx";
window.close();
// Minimize();
window.opener.setVal(1);
return false;
}
});
 
This highlighted version is working in desktops and not working laptops.If there any code for laptop devices 
 
or Please refer the code from following link
http://www.c-sharpcorner.com/UploadFile/4d9083/capturing-image-from-web-cam-in-Asp-Net/