Browse Source

Support turn.urls with TURN service

For backwards compatibility we return the first in list TURN server directly. This allows clients which do not implement any selection still use TURN and lets the TURN service control which one it should be (first in list is used).
pull/374/head
Simon Eisenmann 9 years ago
parent
commit
eacfa0127c
  1. 7
      go/channelling/turnservice_manager.go

7
go/channelling/turnservice_manager.go

@ -97,6 +97,13 @@ func (mgr *turnServiceManager) turnData(credentials *turnservicecli.CachedCreden @@ -97,6 +97,13 @@ func (mgr *turnServiceManager) turnData(credentials *turnservicecli.CachedCreden
turn.Servers = credentials.Turn.Servers
turn.Ttl = int(ttl)
turn.GeoURI = credentials.Turn.GeoURI
if len(turn.Servers) > 0 {
// For backwards compatibility with clients which do not
// understand turn.Servers, directly deliver the first TURN
// server zone URNs.
turn.Urls = turn.Servers[0].URNs
}
}
}

Loading…
Cancel
Save