mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 15:16:52 +08:00
Enable STUN by default in examples
This commit is contained in:
@@ -26,7 +26,13 @@ func main() {
|
|||||||
/* Everything below is the pion-WebRTC API, thanks for using it! */
|
/* Everything below is the pion-WebRTC API, thanks for using it! */
|
||||||
|
|
||||||
// Create a new RTCPeerConnection
|
// 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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,13 @@ func main() {
|
|||||||
webrtc.RegisterDefaultCodecs()
|
webrtc.RegisterDefaultCodecs()
|
||||||
|
|
||||||
// Create a new RTCPeerConnection
|
// 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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,13 @@ func main() {
|
|||||||
webrtc.RegisterDefaultCodecs()
|
webrtc.RegisterDefaultCodecs()
|
||||||
|
|
||||||
// Create a new RTCPeerConnection
|
// 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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,13 @@ func main() {
|
|||||||
webrtc.RegisterCodec(webrtc.NewRTCRtpVP8Codec(webrtc.DefaultPayloadTypeVP8, 90000))
|
webrtc.RegisterCodec(webrtc.NewRTCRtpVP8Codec(webrtc.DefaultPayloadTypeVP8, 90000))
|
||||||
|
|
||||||
// Create a new RTCPeerConnection
|
// 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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user