HTML5 Webcam Capture with JavaScript
Designed for web browsers based on the WebKit code library, such as Google Chrome. This code makes use of the WebKit-specific “webkitGetUserMedia” function, as a generic implementation of “getUserMedia” that works in the same way in all browsers has not yet been decided on. It should also be noted that it might be a fairly trivial task to modify the code to work in other browsers.