// Create new PeerConnection
peerConnection, err := webrtc.NewPeerConnection(webrtc.Configuration{
- ICEServers: []webrtc.ICEServer{
- {
- URLs: []string{TURN_SERVER_ADDR[0].Addr},
- Username: TURN_SERVER_ADDR[0].Id,
- Credential: TURN_SERVER_ADDR[0].Pw,
- },
- },
+ // ICEServers: []webrtc.ICEServer{
+ // {
+ // URLs: []string{TURN_SERVER_ADDR[0].Addr},
+ // Username: TURN_SERVER_ADDR[0].Id,
+ // Credential: TURN_SERVER_ADDR[0].Pw,
+ // },
+ // },
})
if err != nil {
log.Print(err)
.then(function(stream){
pc = new RTCPeerConnection({
- // iceServers: [
- // {
- // urls: TURN_SERVER_ADDRESS.addr,
- // username: TURN_SERVER_ADDRESS.id,
- // credential: TURN_SERVER_ADDRESS.pw
- // }
- // ]
+ iceServers: [
+ {
+ urls: TURN_SERVER_ADDRESS.addr,
+ username: TURN_SERVER_ADDRESS.id,
+ credential: TURN_SERVER_ADDRESS.pw
+ }
+ ]
})
document.getElementById('localVideo').srcObject = stream