问题
I just want take online photo for student entry (school management). I can't take photo from the web cam. No effects occurs on page.
<script src="Webcam_Plugin/jquery.webcam.js" type="text/javascript"></script>
<script type="text/javascript">
var pageUrl = "student_admision.aspx";
$(function () {
jQuery("#webcam").webcam({
width: 320,
height: 240,
mode: "save",
swffile: "Webcam_Plugin/jscam.swf",
debug: function (type, status) {
$('#camStatus').append(type + ": " + status + '<br /><br />');
},
onSave: function (data) {
$.ajax({
type: "POST",
url: pageUrl + "/GetCapturedImage",
data: '',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (r) {
//$("[id*=imgCapture]").css("visibility", "visible");
//$("[id*=imgCapture]").attr("src", r.d);
var img = new Image();
img.src = r.d;
img.onload = function () {
$("[id*=imgCapture]")[0].src = img.src;
$("[id*=imgCapture]").show();
$("#imgLoader").hide();
};
},
failure: function (response) {
alert(response.d);
}
});
},
onCapture: function () {
webcam.save(pageUrl);
}
});
});
function Capture() {
$("#imgLoader").show();
$("[id*=imgCapture]").hide();
webcam.capture();
return false;
}
</script>
But no flash object appears on my page. Can anyone refer me to the best article?
来源:https://stackoverflow.com/questions/58772280/how-to-get-photo-from-web-cam-and-store-it-into-a-varbinary-column-with-asp-net