问题描述
当系统连接到局域网时,如何为 webRTC 设置信令服务器?我们必须使用 STUN 和 TURN 服务器进行信令吗?
how to setup a signaling server for webRTC when the system are connected in Local Area Network? Its mandatory that we must use STUN and TURN server for signaling?
推荐答案
Webrtc 需要某种信令系统来进行初始协商.. 比如传输 SDP
、ICE-candidates
, 发送和接收 offers
等... 其余部分由对等连接完成.对于初始信号,您可以使用任何技术,例如发送 AJAX 调用、使用 socket.io 等.
Webrtc needs some kind of signalling system for initial negotiation.. like transferring SDP
, ICE-candidates
, sending and receiving offers
etc... rest is done by peer-peer connection. For initial signalling you can use any technique like sending AJAX calls, using socket.io etc.
NAT 穿越需要 STUN 和 TURN 服务器,NAT 穿越很重要,因为它需要确定对等体之间的路径.您可以使用谷歌提供的 STUN/TURN 服务器地址 stun:stun.l.google.com:19302
等,也可以使用 rfc-5766 转服务器
STUN and TURN servers are required for NAT traversal, NAT traversal is important because it is needed for determining the path between peers. You can use google provided STUN/TURN server address stun:stun.l.google.com:19302
etc , or you can configure your own turn server by using rfc-5766 turn server
这篇关于webRTC 设置信令服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!