为什么getUserMedia()在chrome中显示权限被拒绝错误 [英] Why getUserMedia() showing permission denied error in chrome

查看:3422
本文介绍了为什么getUserMedia()在chrome中显示权限被拒绝错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用getUserMedia()在node.js和angular project(MEAN)中进行视频流传输。我的< video> 标签位于部分文件内。这个项目运行顺利&本地服务器中的Google Chrome,Opera和Firefox兼容。但是,当我试图通过使用谷歌浏览器的Ubuntu服务器运行它时(仅Chrome问题),视频不显示。

控制台中的错误详情如下:

(程式):84 navigator.getUserMedia错误:PermissionDeniedError(错误名称)

我使用chrome版本47.0.2526.80。项目。我也收到警告,要将我的应用程序切换到安全的来源,例如HTTPS。为什么它在Chrome中无法正常运行。 Google Chrome已停止支持 getUserMedia()以及其他一些功能。 诸如 Geolocation 全屏等不安全来源的功能。我认为它允许localhost的这些特性来启用测试,但它们不会在实际的服务器上运行。



以下是谷歌的相关公告:



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


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.

解决方案

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

这篇关于为什么getUserMedia()在chrome中显示权限被拒绝错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆