The jQuery webcam plugin by Robert Eisele is a transparent layer to communicate with a camera directly in JavaScript.