1.Chrome 瀏覽器使用 navigator.mediaDevices.getUserMedia獲取資源時報錯
Cannot read property getUserMedia of undefined
2.Chrome 瀏覽器http無法調用音頻設備
Microphone and Camera access 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.
解決Chrome瀏覽器安全權限問題
我們可以通過以下方式解決:
一、網頁使用https方式訪問
此操作需要依賴web服務提供者實現https的訪問方式。
二、修改瀏覽器安全配置(最直接、簡單)
1、瀏覽器地址欄輸入:
chrome://flags/#unsafely-treat-insecure-origin-as-secure
2、開啟Insecure origins treated as secure
在輸入欄內輸入你需要訪問音頻設備的地址url,然后將右側Disabled 改成 Enabled,瀏覽器會提示重啟(Relaunch)