Bu yazının en iyi çözümü WebRTC'dir. supported in Chrome, Mozilla and Opera, ancak Internet Explorer ve Safari'de hala erişilemez.
Minimalist demo.
Index.html
<!DOCTYPE html>
<head>
</head>
<body>
<video></video>
<script src="webcam.js"></script>
</body>
webcam.js
(function() {
navigator.getMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia);
navigator.getMedia(
// constraints
{video:true, audio:false},
// success callback
function (mediaStream) {
var video = document.getElementsByTagName('video')[0];
video.src = window.URL.createObjectURL(mediaStream);
video.play();
},
//handle error
function (error) {
console.log(error);
})
})();
here veya there
daha bu yapılamaz okuyun. - http://stackoverflow.com/questions/6976079/html-5-streaming-webcam-video/6976093#6976093 – aioobe
Yanıtının yanıtını izleyin. Bazı kısıtlamalar içinde mümkündür. –
[Web sayfalarına web kamerasına erişme] 'nin olası kopyası (http://stackoverflow.com/questions/9533773/accessing-webcam-in-web-pages) –