The getUserMedia API allows to stream the user’s webcam via JavaScript.
http://makio.free.fr/
I wrote a little example on this page:
http://p5lyon.tumblr.com/ProcessingJSGetUserMedia
Of course you'll need an getUserMedia compatible browser
http://makio.free.fr/