Reputation: 14318
Is it possible to communicate with a camera directly in pure JavaScript (no library like jQuery)?
If yes, what is the most simple pure javascript code to do that?
Upvotes: 4
Views: 1907
Reputation: 21517
getUserMedia
is available in preview builds of all browsers.
How do I access navigator.getUserMedia()?
Upvotes: 3
Reputation: 28336
Not possible on client-side JavaScript with any technology I know of. It'd be a security violation to allow such a thing. You'll need to use Flash, Java, Silverlight or some other form of browser plugin. However, you can interact with a Flash object using JavaScript.
There's a nice tutorial about using a webcam in Flash / AS3 here: http://theflashstudioblog.blogspot.com/2010/10/capturing-webcam-input-with.html
Upvotes: -1
Reputation: 1306
It isn't posible to do that using pure Javascript (I believe it will be possible soon), but I know it can be done using Flash or Java applets.
Upvotes: 0