mirror of
https://github.com/pion/webrtc.git
synced 2025-10-13 02:43:48 +08:00
Finish STUN implementation
* Do not increment component id (this is used for marking RTP/RTCP) * Add STUN to all examples so that they work out of the box * Cast Addr from STUN client to UdpAddr instead of parsing
This commit is contained in:
@@ -27,7 +27,13 @@ func main() {
|
||||
/* Everything below is the pion-WebRTC API, thanks for using it! */
|
||||
|
||||
// Create a new RTCPeerConnection
|
||||
peerConnection, err := webrtc.New(&webrtc.RTCConfiguration{})
|
||||
peerConnection, err := webrtc.New(&webrtc.RTCConfiguration{
|
||||
ICEServers: []webrtc.RTCICEServer{
|
||||
{
|
||||
URLs: []string{"stun:stun.l.google.com:19302"},
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user