Why getUserMedia() showing permission denied error in chrome

僤鯓⒐⒋嵵緔 提交于 2019-12-06 06:57:05

问题


I am using getUserMedia() for video streaming in node.js and angular project(MEAN). My <video> tag is inside partial file. This project is running smoothly & compatible in Google Chrome, Opera and Firefox in local server. But when I am trying to run it over Ubuntu server using Google Chrome (only problem with Chrome), video is not showing.
Error details in console as follows:

(program):84 navigator.getUserMedia error: PermissionDeniedError(error name)

I am using chrome version 47.0.2526.80 .I am using http for this project. I am also getting warning to switching my application to a secure origin, such as HTTPS. Why it is not running properly in Chrome.


回答1:


Google Chrome has stopped supporting getUserMedia() along with some other features like Geolocation, Fullscreen etc. on insecure origins. I think it allows these features for localhost in order to enable testing but they won't work on an actual server.

Here is the related announcement from google:

https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins



来源:https://stackoverflow.com/questions/34178100/why-getusermedia-showing-permission-denied-error-in-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!