Created
January 20, 2012 07:45
-
-
Save segphault/1646026 to your computer and use it in GitHub Desktop.
Live video with getUserMedia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>HTML5 Webcam Test</title> | |
</head> | |
<body> | |
<h2>The Thing cannot be described—there is no language for such abysms of shrieking and immemorial lunacy, such eldritch contradictions of all matter, force, and cosmic order</h2> | |
<video id="live" autoplay></video> | |
<script type="text/javascript"> | |
video = document.getElementById("live") | |
navigator.webkitGetUserMedia("video", | |
function(stream) { | |
video.src = window.webkitURL.createObjectURL(stream) | |
}, | |
function(err) { | |
console.log("Unable to get video stream!") | |
} | |
) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment