【发布时间】: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