我从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运行良好。
我本地化失败的原因是什么? 谢谢!
最佳答案
尝试此方法来获取用户媒体
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
关于python - apprtc - getusermedia() 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23278308/