chrome运行不了啊,
浏览器打开
http://davidwalsh.name/demo/camera.php没问题,摄像头工作正常
<html>
<head>
</head>
<body>
<p>WEBRTC</p>
<script >
<video id="video" autoplay="" width="320px" height="240px"></video>
var video = document.getElementById("video");
navigator.webkitGetUserMedia("video", gotStream, noStream);
function gotStream(stream) {
video.src = webkitURL.createObjectURL(stream);
video.onerror = function () {
stream.stop();
streamError();
};
}
function noStream() {
document.getElementById("errorMessage").textContent = "No camera available.";
}
function streamError() {
document.getElementById("errorMessage").textContent ="Camera error.";
}
</script>
</body>
</html>
--
修改:SlANmASTer FROM 211.99.222.*
FROM 211.99.222.*