今天在写H5调用手机摄像头时提示一个错误信息如下:

NotSupportedError Only secure origins are allowed (see: https://goo.gl/Y0ZkNV).
[Deprecation] getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your
application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.

错误大概意思是说:

NotSupportedError仅允许安全起源(请参阅:https://goo.gl/Y0ZkNV)。
[Deprecation] getUserMedia()不再适用于不安全的起源。 要使用此功能,您应该考虑切换您的
应用程序到安全源,例如HTTPS。 有关详细信息,请参阅https://goo.gl/rStTGz。

也就是说访问的网页地址必须是https开头的链接不能是http。

相关文章:

  • 2022-12-23
  • 2021-04-08
  • 2021-07-28
猜你喜欢
  • 2021-09-27
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2021-06-16
  • 2021-11-12
相关资源
相似解决方案