Skip to content

Instantly share code, notes, and snippets.

@drewww
Created May 26, 2012 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save drewww/2794406 to your computer and use it in GitHub Desktop.
Save drewww/2794406 to your computer and use it in GitHub Desktop.
JSCam Test
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>jscam test</title>
<script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script type="text/javascript" src="jscam/jquery.webcam.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
console.log("document ready!");
$("#camera").webcam({
width: 320,
height: 240,
mode: "callback",
swffile: "jscam/jscam.swf",
onTick: function() {console.log("tick");},
onSave: function() {console.log("save");},
onCapture: function() {console.log("capture");},
debug: function(type, string) {console.log("debug: " + type + "; " + string);},
onLoad: function() {console.log("load");}
});
});
</script>
</head>
<body id="index" onload="">
<div id="camera"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment