Javascript implementation for using the browser webcam