【发布时间】:2014-04-23 17:39:59
【问题描述】:
测试代码:
<!doctype html>
<html>
<body>
<video id="v1" autoplay="autoplay"></video>
<script>
navigator._getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
navigator._getUserMedia({video: true}, function(stream) {
document.getElementById('v1').src = URL.createObjectURL(stream);
}, function() {});
</script>
</body>
</html>
This 是 firefox 28.0 捕获的内容。网络摄像头是Logitech C210。它在skype 和chrome 中运行良好。计算机正在运行windows 8。此外,它还可以在具有windows 7 的其他计算机上运行。提交了bug report。有什么想法吗?
【问题讨论】:
-
使用最新的浏览器,因为这是一个变化非常快的字段,请参阅 developer.mozilla.org/en-US/docs/Web/API/Navigator.getUserMedia 以获取有关供应商前缀和最新代码的指南
标签: javascript firefox webcam webrtc