mirror of
https://github.com/jech/galene.git
synced 2024-11-22 08:35:57 +01:00
Reduce delays in RelayTest.
This commit is contained in:
parent
25ce8ef666
commit
3a9f63396c
1 changed files with 10 additions and 1 deletions
11
ice/ice.go
11
ice/ice.go
|
@ -125,10 +125,19 @@ func ICEConfiguration() *webrtc.Configuration {
|
|||
}
|
||||
|
||||
func RelayTest() (time.Duration, error) {
|
||||
|
||||
conf := ICEConfiguration()
|
||||
conf2 := *conf
|
||||
conf2.ICETransportPolicy = webrtc.ICETransportPolicyRelay
|
||||
pc1, err := webrtc.NewPeerConnection(conf2)
|
||||
|
||||
var s webrtc.SettingEngine
|
||||
s.SetHostAcceptanceMinWait(0)
|
||||
s.SetSrflxAcceptanceMinWait(0)
|
||||
s.SetPrflxAcceptanceMinWait(0)
|
||||
s.SetRelayAcceptanceMinWait(0)
|
||||
api := webrtc.NewAPI(webrtc.WithSettingEngine(s))
|
||||
|
||||
pc1, err := api.NewPeerConnection(conf2)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue