通过 http 访问 Google Chrome 中的网络摄像头时遇到问题,大多数情况下它允许通过 https 使用网络摄像头。其他浏览器没有这样的问题。
例如 yahoo gifshot 给出错误:
"There was an issue with the getUserMedia API - the user probably denied permission"
和http://demo.mycodingtricks.com/javascript/webcam-api/给出消息:
"Webcam.js Error: Could not access webcam: PermissionDeniedError: Only secure origins are allowed"
并将我们发送至 https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features
那么造成这种行为的原因是什么?浏览器设置为默认设置。
最佳答案
已经找到答案了。 https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins Google Chrome 不允许通过不安全的连接访问用户个人数据
关于javascript - 通过http在浏览器中访问网络摄像头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39228267/