Created
March 10, 2012 06:20
-
-
Save tonyjcamp/2010552 to your computer and use it in GitHub Desktop.
getUserMedia example DOM
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=0.5"> | |
<title>Oh hai.</title> | |
</head> | |
<body> | |
<video id="video" width="640" height="480" autoplay> | |
<!-- Here you can set some default video up if the camera API no worky --> | |
<source src="default.webm" type="video/webm;" codecs="vp8, vorbis"> | |
<source src="default.mp4" type="video/mp4;" codecs="avc1.42E01E, mp4a.40.2"> | |
</video> | |
<button id="take">Take Picture</button> | |
<!-- NEEDS THE DAMN WIDTH AND HEIGHT SET ON THE ELEMENT IF YOU NO HAS, PICTURE LUK FUNY--> | |
<!-- SCALES IMPROPERLY WITHOUT WIDTH AND HEIGHT ON ELEMENT. CSS NO HELPY --> | |
<canvas id="snapshot" width="640" height="480"></canvas> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment