[英]Webcam JS in Bootstrap Modal
我正在为网络摄像头使用jhuckaby / webcamjs jquery插件。
我正在使用Bootstrap模式加载网络摄像头。
但是Adobe通知不会在引导程序模式中自动填充。
通知图像为:
当我直接加载无模式的div时,通知正在加载
jQuery查询
var swfURL = '@Url.Content("~/Scripts/jscam.swf")';
$("#Camera").webcam({
width: 320,
height: 240,
mode: "save",
swffile: swfURL,
onLoad: function () {
$("#SubmitPic").on("click", webcam.capture);
},
onTick: function () {
},
onSave: function () {
UploadPic();
},
onCapture: function () {
webcam.save(captureImageSaveURL);
},
debug: function () { },
});
HTML 模态
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header model-bg">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Take Picture</h4>
</div>
<div class="take-photo">
<div style="border: 4px solid #ccc; padding: 5px">
<div id="Camera" style="height: 240px; width: 100%;"></div>
<div class="col-lg-12">
<center>
<button type="button" class="btn btn-default" style="color:#fff;" id="SubmitPic" name="command" value="Capture" onclick="clickCapture();">
<span class="glyphicon glyphicon-camera"></span>@Resources.VMSResource.Capture
</button>
</center>
</div>
</div>
</div>
</div>
</div>
</div>
纽扣
<div class="fileUpload btn btn-primary cam-al">
<a href="#" style="color: #fff; text-decoration: none;" data-toggle="modal" data-target="#myModal">
<img src="../Images/cam.png" alt="cam" style="z-index: 9999;">
<span style="color: #fff;">@Resources.VMSResource.TakePhoto</span>
<input type="button" id="Capture" name="command" value="Reset" class="upload">
</a>
</div>
请协助我解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.