Skip to content

Instantly share code, notes, and snippets.

@boyofgreen
Created March 26, 2012 20:23
Show Gist options
  • Save boyofgreen/2209391 to your computer and use it in GitHub Desktop.
Save boyofgreen/2209391 to your computer and use it in GitHub Desktop.
face reco css
App.init = function() {
// Prep the document
App.video = document.querySelector('video');
App.glasses = new Image();
App.glasses.src = "i/glasses.png";
App.canvas = document.querySelector("#output");
App.ctx = this.canvas.getContext("2d");
// Finally Check if we can run this puppy and go!
if (navigator.webkitGetUserMedia) {
navigator.webkitGetUserMedia('video', App.successCallback, App.errorCallback);
}
App.start();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment