-
-
Save polatengin/104d28edab721668a7315bc27943ae0a to your computer and use it in GitHub Desktop.
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
HTML5 video element ile cihazın Camera görüntüsünü göstermek |
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 lang="tr"> | |
<head> | |
<title>Video Camera</title> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
</body> | |
</html> |
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
{ | |
video: { | |
mandatory: { | |
minWidth: 1280, | |
minHeight: 720 | |
} | |
} | |
} |
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
<video id="cameraPlayer" autoplay></video> | |
<script> | |
if (navigator.getUserMedia) { | |
navigator.getUserMedia({ video:true, audio:false }, function(stream) { | |
var output = document.getElementById(‘cameraPlayer’); | |
output.src = window.URL.createObjectURL(stream); | |
}, function(error) {}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment