Avoiding NavigatorUserMediaError “Only secure origins are allowed” on HTTP in Chrome

后端 未结 2 1358
太阳男子
太阳男子 2021-01-17 17:18

I\'m trying to make some audio/video tests with a JavaScript library for SIP phones and since Chrome 47 I can no longer test in local development because of this error:

2条回答
  •  太阳男子
    2021-01-17 17:55

    According to https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features, localhost is supposed to be considered as a secure origin.

    If you do not test on localhost but on a real domain, then you should enable an HTTPS access (you can get a free certificate with Let's Encrypt)

提交回复
热议问题