今天在写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

Q群【308742428】大家一起讨论技术。

后面会不定时为大家更新文章,敬请期待。