【发布时间】:2014-08-22 11:45:37
【问题描述】:
我正在关注这个http://www.html5rocks.com/en/tutorials/webrtc/infrastructure 教程。本教程或讨论是关于 TURN/STUN 服务器的。而本教程添加了如下所示的转向和眩晕服务器代码。
{
'iceServers': [
{
'url': 'stun:stun.l.google.com:19302'
},
{
'url': 'turn:192.158.29.39:3478?transport=udp',
'credential': 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
'username': '28224511:1379330808'
},
{
'url': 'turn:192.158.29.39:3478?transport=tcp',
'credential': 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
'username': '28224511:1379330808'
}
]
}
我可以使用此凭据在浏览器之间(在不同的电脑上)进行 Web-RTC 通信吗?
我还阅读了本教程Implementing our own STUN/TURN server for WebRTC Application。根据本教程,当我们为 nat 和防火墙使用 turn server 时,不需要使用 stun server。而本教程为眩晕和转动服务器添加了这段代码。
var pc_config = {"iceServers": [{"url":"turn:my_username@<turn_server_ip_address>", "credential":"my_password"}]};
pc_new = new webkitRTCPeerConnection(pc_config);
什么是“turn_server_ip_address”或什么是“my_password”?我怎么知道这个凭证?
【问题讨论】:
标签: html5-video webrtc stun peer rfc5766turnserver