How to capture image from client webcam in asp.net

柔情痞子 提交于 2019-12-12 07:15:40

问题


I am working on an ASP.Net application and I want users to be able to take a picture with their local webcam and then upload it to the server. I can, of course, rely on users doing this manually via their locally installed software, save the image as a file and do a normal file upload. However, what I really want to do is incorporate it all into a UI in the browser. I know this means accessing local resources so do I need an ActiveX control or Silverlight or is there something I could do in Javascript for example?

This is initially intended for an Intranet app so I can have control of the client's environemnt, including stipulating the browser etc, which means I can use an ActiveX control if I have to. However, it would be nice if I could write this in a generic way so it could be used in an internet app generally (happy to stipulate that it only works on Windows clients but would be good to get it to work in FireFox).

Thanks.


回答1:


The only acceptable and universal way to this for now is Flash/Flex application. Flash player presets literally in every browser in the world and all of them has such capability.




回答2:


VideoCap Pro is quite popular, and it offers an ActiveX version, have you checked it out?




回答3:


This sounds very suspicious to me. You realize the nefarious applications this could be applied to, right? A web page that when a user browses to it, unknownst to them, their webcam snaps a pic of them. ... I don't like it.




回答4:


You could use the Nimbb API to do the webcam video recording inside a browser.




回答5:


It is possible to get the image from client webcam in asp.net, you have to install the Silverlight 4 with Visual Studio 2010:

Go to following link:

http://wildermuth.com/2009/11/23/Taking_a_WebCam_Photo_with_Silverlight



来源:https://stackoverflow.com/questions/321246/how-to-capture-image-from-client-webcam-in-asp-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!