chrome浏览器报Cannot read properties of undefined (reading 'getUserMedia')

发布时间 2023-11-15 16:46:03作者: 荷楠仁

chrome访问摄像头的时候可能报这个错误。使用https协议可以解决这个问题,如果不能使用https可以通过修改chrome配制解决。

  1. 在chrome地址栏输入chrome://flags/#unsafely-treat-insecure-origin-as-secure
  2. 在Insecure origins treated as secure的输入框输入要打开网页的地址如http://10.1.1.1:8081
  3. 把右边的Disnabled改成Enabled
  4. 点右下角的Relaunch