使用nodejs服务器为本机android构建Apprtc

时间:2016-02-12 16:13:13

标签: android node.js webrtc

我通过从https://github.com/njovy/AppRTCDemo获取代码,成功构建了原生Android的AppRTC  我可以让videocalls提供演示应用程序的地址(https://apprtc.appspot.com/?r=XXXXXXXX)。现在我已经安装了nodejs 并在我的系统中运行节点静态服务器。我也知道要在我的本地服务器上运行该应用程序,我们已删除Google TURN服务器。但是如何绕过这个转弯服务器。我也读过这个ApprtcDemo with local server works between browsers but not Android native to browser,但无法清楚地理解。

问题是我需要在代码中进行更改以及如何为节点服务器安装转服务器以便android可以连接到我的本地服务器。如何在Centos7中管理转弯服务器的设置以及apprtc.py

是什么

我是新手,并没有太多的服务器知识,所以如果我有任何问题,请忽略它,但请回复我。

经过大量工作后,我按照https://www.webrtc-experiment.com/docs/TURN-server-installation-guide.html

链接安装了转弯服务器

现在我必须更改我的代码中的网址,但我无法知道在Apprtc演示示例中为本机安卓做什么以及在哪里进行更改

2 个答案:

答案 0 :(得分:0)

nodejs has nothing to do with TURN server, I believe you are using nodejs for signalling. If you do not want to use TURN server then you have to remove this url from iceServer configuration. For TURN server local setup, what TURN server you are trying to setup locally? May be you should find some free TURN serve binary along with setup documentation. But why don't you just try any TURN service available for free or as an evaluation?

[Edited] The purpose of TURN server is to facilitate connectivity when both end point are not able to connect using the local candidates where STUN server helps to identify the server-reflexive candidate and TURN is to allocate a Relay candidate. Just to understand your case, you want to run TURN/STUN server in your LAN setup? then there is no use of TURN I guess as TURN server itself is residing inside of the NAT. The general setup requirement of TURN server is have a public IP address which will be used as a Relay candidate for the end points. If you understand this case and still want to setup TURN inside of NAT then its not a harm but to remind you that you won't be able to use TURN when any end point is our of that LAN.

答案 1 :(得分:0)

在google上进行大量搜索后,我从https://github.com/webrtc/apprtc链接中找到了我的解决方案,您必须在节点js上使用google app引擎来制作本地服务器。