原因分析:
1、http协议的网站的安全原因,不能访问本地的麦克风
2、允许打开麦克风的请求有http://localhost/以及https请求。
解决方法:
方法一:
访问摄像头,麦克风等必须使用https,将网站部署成https请求
方法二:
官方解释:
You can run chrome with the --unsafely-treat-insecure-origin-as-secure="http:example.com" flag (replacing "example.com" with the origin you actually want to test), which will treat that origin as secure for this session. Note that on Android and ChromeOS this requires having a device with root access/dev mode. (This flag is broken in Chrome 63 but fixed in Chrome 64 and later. Prior to Chrome 62, you must also include the --user-data-dir=/test/only/profile/dir to create a fresh testing profile for the flag to work.)
右键点击Chrome桌面快捷方式,打开属性
在 “快捷方式页-目标”最后输入以下内容