如何通过 Internet Explorer (11) 访问网络摄像头?

问题描述:

上下文:我正在构建一个离线网站(html5、css、js),我想通过 IE (11) 调用它.要拍摄/保存照片,我需要访问网络摄像头.

Context: I'm building an offline website (html5, css, js) which i want to call over IE (11). For taking/saving a picture i need to access the webcam.

方法:我了解到 IE 不支持 getUserMedia;唯一的办法就是使用flash.

Approach: I read that IE doesn't support the getUserMedia; and the only way is to use flash.

问题: 是否只能通过 IE 使用 Flash 访问网络摄像头?如果是,请推荐一个例子.

Question: Is the only possibility to access the webcam over IE by using flash? If yes, please recommend an example.

非常感谢您的意见.

是的 IE 11 及以下目前不支持 getUserMedia ,但在 github 上有一个 polyfill,你可以找到 这里

Yes IE 11 and below currently doesn't support getUserMedia ,but there is a polyfill available on github, which you can find here

它使用闪存回退,以防 getUserMedia 不可用,因此您可以尝试一下.

It uses flash fallback in case getUserMedia is unavailable so you can give it a try.

更新 1

还有一些可用的 polyfills 列在

There are a few more polyfills available and are listed under

webrtc4allTemasys WebRTC 可以通过 NPAPI/ActiveX 插件提供回退.

webrtc4all and Temasys WebRTC can provides fallback via an NPAPI/ActiveX plugin.