简体   繁体   English

如何检查自定义TURN服务器是否与easyRTC一起使用

[英]How do I check custom TURN server is working with easyRTC

I am working on an application for Audio/Video calls using easyrtc. 我正在使用easyrtc开发音频/视频通话应用程序。 I have added turn server details in server.js file to configure the turn servers I want to use. 我在server.js文件中添加了转弯服务器详细信息,以配置要使用的转弯服务器。

var myIceServers = [
  {url: "stun:stun.anyfirewall.com:3478"},
  {url: "turn:turn.anyfirewall.com:443", "username":"xxxxx", "credential":"xxxxx"},
  {url: "turn:turn.anyfirewall.com:443?transport=tcp", "username":"xxxxx", "credential":"xxxxx"}
];

then set options for appIceServers using below line of code. 然后使用下面的代码行设置appIceServers的选项。

easyrtc.setOption("appIceServers", myIceServers);

and configured the listener as well. 并配置监听器。

easyrtc.on("getIceConfig", function(connectionObj, callback){
  callback(null, myIceServers);
}

After this when I am running easyrtc simple audio-video demo, from local machine, in chrome using two tabs it works fine. 之后,当我从本地计算机运行chrome的easyrtc简单音频视频演示时,使用两个选项卡在chrome中运行正常。

Now I have two questions : 现在我有两个问题

  1. How do I make sure that easyrtc is using custom supplied TURN server configuration ? 如何确保easyrtc使用的是自定义提供的TURN服务器配置?
  2. And from where I need to test the links for my application, which will make sure that easyrtc is using custom supplied TURN url for tcp ? 并从哪里需要测试我的应用程序的链接,这将确保easyrtc对tcp使用自定义提供的TURN URL? (ie firewall check). (即防火墙检查)。

You can turn the "log level" to "3" in server.js to see more detail logs, and use chrome://werbrtc-internals to see the chrome webrtc logs . 您可以在server.js中将“日志级别”设置为“ 3”以查看更多详细日志,并使用chrome:// werbrtc-internals查看chrome webrtc日志。 I just set up a TURN server yesterday and in my way , I modified the easyrtc_default_options to using my own TURN,I think your configuration will work if you test with two client in different network, the Turn server will give you a feedback. 我昨天刚刚设置了一个TURN服务器,并且以这种方式,我将easyrtc_default_options修改为使用自己的TURN,我认为如果您在不同网络中的两个客户端进行测试,则您的配置将起作用,Turn服务器将为您提供反馈。

"from local machine, in chrome using two tabs it works fine." “从本地计算机,在chrome中使用两个标签可以正常工作。” this is not using you TURN server. 这不使用您的TURN服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM