【问题标题】:apprtc - getusermedia() failedapprtc - getusermedia() 失败
【发布时间】:2014-04-24 19:40:13
【问题描述】:

我从here 下载了apprtc。然后我安装了 python 2.7、google-appengine-api 和所有依赖项。我将所有内容添加到我的路径并运行以下命令:

dev_appserver.py apprtc

产生以下输出:

INFO     2014-04-24 21:31:34,246 sdk_update_checker.py:242] Checking for updates
to the SDK.
INFO     2014-04-24 21:31:35,681 sdk_update_checker.py:286] This SDK release is
newer than the advertised release.
INFO     2014-04-24 21:31:35,917 api_server.py:171] Starting API server at: http
://localhost:46857
INFO     2014-04-24 21:31:35,924 dispatcher.py:182] Starting module "default" ru
nning at: http://localhost:8080
INFO     2014-04-24 21:31:35,927 admin_server.py:117] Starting admin server at:
http://localhost:8000

但如果我现在在 chrome 或 firefox 中打开 localhost:8080 会弹出以下消息:

getusermedia() failed. is this a webrtc capable browser

Gathered ICE Candidates
Local:
Remote:
getUserMedia failed with exception: getUserMedia is not defined

但如果我打开 the official apprtc demo 它运行良好。

我在本地失败的原因是什么? 谢谢!

【问题讨论】:

  • 1.你使用的是什么浏览器?确保您使用最新的浏览器。 2. 在 chrome://flags 中启用标志(这可能不适用于每个版本) 3. 在 Firefox 中,您不能在两个选项卡中使用相机,请确保关闭 apprtc 选项卡,然后尝试您的代码
  • 4.检查您是否也使用了正确的供应商前缀。
  • 您如何访问adapter.js?我猜垫片现在无法访问。下载 adapter.js 并将其添加到您的页面。

标签: python webrtc getusermedia


【解决方案1】:

试试这个来获取用户媒体

navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-11
    • 1970-01-01
    • 2017-05-03
    • 2019-07-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多