Skip to content

Instantly share code, notes, and snippets.

@scottgwald
Created January 8, 2014 06:52
Show Gist options
  • Save scottgwald/8312821 to your computer and use it in GitHub Desktop.
Save scottgwald/8312821 to your computer and use it in GitHub Desktop.
take photo and show
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<img id="image" width="640" height="360" />
<script>
function photoPath(data) {
WS.say("I got your photo");
img = document.getElementById("image");
img.src = data;
}
function main() {
if (WS.scriptVersion(0)) return;
WS.cameraPhotoPath('photoPath');
}
window.onload = main;
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment