tags:

views:

286

answers:

2

Is there a way to capture images from a webcam with JavaScript?

+3  A: 

Nope - think of the security implications!

It is possible with Flash, but the user will see a popup requesting access to their webcam.

Mike Robinson
+2  A: 

If the webcam had a web interface, then in theory it would be possible to just slap an image tag into a page somewhere and point it directly at the cam's snapshot interface:

<img src="http://address.of.webcam.example.com/webcam/capture" />

But otherwise, no. Standard Javascript has no API for accessing a webcam. There's no

var wc = new WebCam();
img = wc.capture();

type calls you can do.

Marc B