如何使Chrome浏览器允许通过http(而非https)访问网络摄像头? [英] How can I make Chrome allow access to a webcam over http (not https)?
问题描述
我正在使用webrtc视频构建信息亭应用程序.它仅在内部网络上提供,我希望始终能够通过http允许我的网站使用网络摄像头.使用ssl并不是那么重要,只是证书的额外费用.
I am building a kiosk application using webrtc video. It is only served on the internal network and I would like to be able to always allow the webcam for my site over http. Using ssl isn't that important and is just an extra expense for a cert.
有什么办法可以做到吗?还是我被卡住了?
Is there any way to do this or am I stuck?
推荐答案
是的,管理员可以使用策略覆盖提示.
Yes, an admin can override the prompts with a policy.
此列表中的模式将与发出请求的URL的安全来源相匹配.如果找到匹配项,则将在没有提示的情况下授予对音频捕获设备的访问权限.注意:当前仅在信息亭模式下运行时才支持此策略.
Patterns in this list will be matched against the security origin of the requesting URL. If a match is found, access to audio capture devices will be granted without prompt. NOTE: This policy is currently only supported when running in Kiosk mode.
在Windows上,您可以使用regedit创建注册表项.
On Windows, you create registry entries using regedit.
Software\Policies\Chromium\VideoCaptureAllowedUrls\1 = "http://www.example.com/"
Software\Policies\Chromium\VideoCaptureAllowedUrls\2 = "http://[*.]example.edu/"
在Linux上,您将策略写入文件:
On Linux you write the policies in a file:
mkdir -p /etc/opt/chrome/policies/managed
touch /etc/opt/chrome/policies/managed/test_policy.json
在test_policy.json中:
In test_policy.json:
{
"VideoCaptureAllowedUrls": ["http://www.example.com/", "http://[*.]example.edu/"]
}
这篇关于如何使Chrome浏览器允许通过http(而非https)访问网络摄像头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!