海康视频插件发布到线上后无法启动问题

208 阅读1分钟

最新项目遇到很多反馈视频无法播放的问题,debug了很多次,最终确定是由于谷歌浏览器会自动强制更新到94最新版本,该版本的一下配置被默认关闭了,一直提示打开插件点了打开无反应,导致插件无法正常启动。

CORS跨域问题:

升级谷歌浏览器最新chrome94版本后,提示Access to XMLHttpRequest at 'http://localhost:xxxx/api' from origin 'xxx.xxx.com:xxxx' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space local.

打开浏览器,进入chrome://flags/页面

搜索Block insecure private network requests

设置为Disabled,Relaunch就好了。