window.gest=function(e){"use strict";navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;var t={framerate:25,videoCompressionRate:4,sensitivity:80,skinFilter:false,debug:{state:false,canvas:null,context:null}},n=false,r=false,i,s,o,u,a=function(){function t(){m.removeEventListener("DOMContentLoaded",document,t);m.removeEventListener("load",e,t);if(l()){n=true}if(r&&n){return e.gest.start()}return false}if(a.prototype._singletonInstance){return a.prototype._singletonInstance}a.prototype._singletonInstance=this;if(document.readyState==="complete"){t.call()}else{m.addEventListener("DOMContentLoaded",document,t);m.addEventListener("load",e,t)}return true},f=function(e){var t=m.createCustomEvent("gest",document);t.direction=e.direction||null;t.up=e.up||false;t.down=e.down||false;t.left=e.left||false;t.right=e.right||false;t.error=e.error||null;m.fireEvent(t)},l=function(){s=document.createElement("video");o=document.createElement("canvas");if(!!s.canPlayType&&!!(o.getContext&&o.getContext("2d"))&&!!navigator.getUserMedia){s.width=300;s.height=225;s.setAttribute("style","visibility: hidden;");document.body.appendChild(s);o.setAttribute("style","width: 300px; display: none;");document.body.appendChild(o);u=o.getContext("2d")}else{c(0);return false}return true},c=function(e,n){var r;switch(e){case 0:r={code:e,message:"gest.js can't run in your browser :("};break;case 1:r={code:e,message:"gest.js could not start."};break;case 2:r={code:e,message:"gest.js has already started."};break;case 10:r={code:e,message:"DEEENIED! gest.js needs webcam access.",obj:n};break;case 11:r={code:e,message:"A constraint specified is not supported by the web-browser.",obj:n};break;case 12:r={code:e,message:"No media tracks of the type specified in the constraints are found.",obj:n};break;case 13:r={code:e,message:"Couldn't get access to...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.