Skip to content

Instantly share code, notes, and snippets.

@onishiweb
Created May 12, 2012 14:44
Show Gist options
  • Save onishiweb/2666919 to your computer and use it in GitHub Desktop.
Save onishiweb/2666919 to your computer and use it in GitHub Desktop.
shoot: function shoot() {
//console.log("testing 1");
var video = document.getElementById('viewfinder');
var w = video.videoWidth;
var h = video.videoHeight;
var canvas = document.getElementById('capture');
canvas.width = w;
canvas.height = h;
var ctx = canvas.getContext('2d');
ctx.drawImage(video, 0, 0, w, h);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment