admin管理员组文章数量:1289509
I have a Django web application in which I want to give an option to capture the image in the registration form. So, whenever the user presses the capture image button then the camera on the client system should open to take the image, the image then would get stored in the server-side folder.
I am thinking that the camera should open from the HTML page and send the image to the server, but I am not able to open the camera using the HTML code.
Please advise me.
I have a Django web application in which I want to give an option to capture the image in the registration form. So, whenever the user presses the capture image button then the camera on the client system should open to take the image, the image then would get stored in the server-side folder.
I am thinking that the camera should open from the HTML page and send the image to the server, but I am not able to open the camera using the HTML code.
Please advise me.
Share Improve this question edited Feb 13, 2020 at 7:06 Rohit416 3,4963 gold badges26 silver badges42 bronze badges asked Dec 18, 2013 at 13:36 PSSRPSSR 4691 gold badge11 silver badges18 bronze badges2 Answers
Reset to default 6You can use WebRTC for this; html5rocks. has a nice tutorial, see especially the example of taking screenshots. To store the image on the server, you'll have to upload it via AJAX.
You have several options to access client webcam. The easiest way is HTML5. But you can use sveral tools in silverlight and flash plugin.
See how-to-access-webcam-from-html5 and html5-getusermedia-record-webcam-both-audio-and-video
After getting image in page you can send it to server in diffrent ways including JavaScript (with AJAX) or using HTML form element (like file input)
版权声明:本文标题:javascript - Why I can't take image snapshot with client-side camera in Django web application? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741467858a2380419.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论