Hello....
Am developed website for webcam capturing images using flash player(.swf) in asp.net4.0 and iis6. But hosted in server 2008 r2 ii7/7.5 is not working. Here am used JSON object,Please help me!. Required any server configuration?
<script src='<%=ResolveUrl("~/Webcam_Plugin/jquery.webcam.js") %>' type="text/javascript"></script>
<script type="text/javascript">
var pageUrl = '<%=ResolveUrl("~/CS.aspx") %>';
$(function () {
jQuery("#webcam").webcam({
width: 214,
height: 140,
mode: "save",
swffile: '<%=ResolveUrl("~/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);
},
failure: function (response) {
alert(response.d);
}
});
},
onCapture: function () {
webcam.save(pageUrl);
}
});
});
function Capture() {
webcam.capture();
return false;
}
</script>
<asp:Image ID="imgCapture" runat="server" Style="width:185px; height:140px;" />
<br />
<asp:Button ID="btnCapture" Text="Capture" runat="server" OnClientClick="return Capture();" style="font-weight: 700; color: #0033CC" />
<br />
<div id="webcam">
</div>
Thank u.