Skip to content

Instantly share code, notes, and snippets.

@Sean-Der
Created June 8, 2019 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sean-Der/0b341f505e4090ff87e24b7c2315e4ec to your computer and use it in GitHub Desktop.
Save Sean-Der/0b341f505e4090ff87e24b7c2315e4ec to your computer and use it in GitHub Desktop.
diff --git a/examples/pion-to-pion/answer/main.go b/examples/pion-to-pion/answer/main.go
index 556d532..d7a6c5e 100644
--- a/examples/pion-to-pion/answer/main.go
+++ b/examples/pion-to-pion/answer/main.go
@@ -22,9 +22,12 @@ func main() {
config := webrtc.Configuration{
ICEServers: []webrtc.ICEServer{
{
- URLs: []string{"stun:stun.l.google.com:19302"},
+ URLs: []string{"turn:localhost"},
+ Username: "user",
+ Credential: "password",
},
},
+ ICETransportPolicy: webrtc.ICETransportPolicyRelay,
}
// Create a new RTCPeerConnection
diff --git a/examples/pion-to-pion/offer/main.go b/examples/pion-to-pion/offer/main.go
index 7879acd..4705748 100644
--- a/examples/pion-to-pion/offer/main.go
+++ b/examples/pion-to-pion/offer/main.go
@@ -23,9 +23,12 @@ func main() {
config := webrtc.Configuration{
ICEServers: []webrtc.ICEServer{
{
- URLs: []string{"stun:stun.l.google.com:19302"},
+ URLs: []string{"turn:localhost"},
+ Username: "user",
+ Credential: "password",
},
},
+ ICETransportPolicy: webrtc.ICETransportPolicyRelay,
}
// Create a new RTCPeerConnection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment