我从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它运行正常。
我失败的原因是什么? 谢谢!
答案 0 :(得分:1)
尝试使用getuser media
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;