我正在开发一个视频通话应用程序。目前使用 Xirsys 的 stun and turn 服务器。我使用https://service.xirsys.com/ice的结果作为我的配置。它是在 Javascript 页面或其他任何内容中使用的正确用户名和凭据吗?如果它是错误的,那么请指导我在哪里可以获得正确的 iceServers 值。
iceServers = [
{ "url": "stun:turn01.uswest.xirsys.com" },
{ "username": "0xxxxxx8-fxxc-1xx6-bxxb-bxxxxxxxxxx8", "url": "turn:turn01.uswest.xirsys.com:80?transport=udp", "credential": "0xxxxxxe-fxxc-1xx6-axx0-axxxxxxxxxx9" },
{ "username": "0xxxxxx8-fxxc-1xx6-bxxb-bxxxxxxxxxx8", "url": "turn:turn01.uswest.xirsys.com:3478?transport=udp", "credential": "0xxxxxxe-fxxc-1xx6-axx0-axxxxxxxxxx9" },
{ "username": "0xxxxxx8-fxxc-1xx6-bxxb-bxxxxxxxxxx8", "url": "turn:turn01.uswest.xirsys.com:80?transport=tcp", "credential": "0xxxxxxe-fxxc-1xx6-axx0-axxxxxxxxxx9" },
{ "username": "0xxxxxx8-fxxc-1xx6-bxxb-bxxxxxxxxxx8", "url": "turn:turn01.uswest.xirsys.com:3478?transport=tcp", "credential": "0xxxxxxe-fxxc-1xx6-axx0-axxxxxxxxxx9" },
{ "username": "0xxxxxx8-fxxc-1xx6-bxxb-bxxxxxxxxxx8", "url": "turns:turn01.uswest.xirsys.com:443?transport=tcp", "credential": "0xxxxxxe-fxxc-1xx6-axx0-axxxxxxxxxx9" },
{ "username": "0xxxxxx8-fxxc-1xx6-bxxb-bxxxxxxxxxx8", "url": "turns:turn01.uswest.xirsys.com:5349?transport=tcp", "credential": "0xxxxxxe-fxxc-1xx6-axx0-axxxxxxxxxx9" }
];
注意:它在同一个网络中工作,但不在不同的网络中。即使在不同的网络中,我也可以接到来电,但在接到电话后,iceConnectionState 会失败。我在这里
也提出了类似的问题,我使用 numb 作为 stun 和 turn server。
提前致谢。