问题
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