Webcam video capture, from ActionScript to JavaScript