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:
Sean DuBois
2018-07-12 04:38:04 +00:00
parent 8ed90c4fb0
commit f440fc32d4
4 changed files with 41 additions and 21 deletions

View File

@@ -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)
}