jhuckaby/webcamjs — pull request #29 by bitopolis (2014-08-25 11:17:51+00:00)
Title: Add support to work with existing canvas

I've been using this library to send images from a webcam to a canvas, and I found it really easy to use, but very slow. The reason is that the Webcam.snap() function already sends video data to a canvas, then converts the image to a URI, hence I was pointlessly converting then reconverting to the other canvas.
To solve this, I've simply added an (optional) argument to Webcam.snap(), so it can now work with an existing canvas object.
Instead of checking for an argument within the function, I just added a new setup parameter, 'cvas' to dictate whether a canvas is being used or not.