Add optional lite ICE agent config param

This commit is contained in:
Sergey Stepanov 2021-12-20 22:28:54 +03:00
parent 589cda91f4
commit f688f3c5f4
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B
3 changed files with 8 additions and 0 deletions

View file

@ -262,6 +262,10 @@ webrtc:
# a list of STUN/TURN servers to use
iceServers:
- url: stun:stun.l.google.com:19302
# configures whether the ice agent should be a lite agent (true/false)
# (performance)
# don't use iceServers when enabled
iceLite: false
# ICE configuration
# by default, ICE ports are random and unlimited
# alternatives:

View file

@ -11,6 +11,7 @@ type Webrtc struct {
Max uint16
}
IceIpMap string
IceLite bool
SinglePort int
}

View file

@ -42,6 +42,9 @@ func DefaultPeerConnection(conf conf.Webrtc) (*PeerConnection, error) {
panic(err)
}
}
if conf.IceLite {
settingEngine.SetLite(conf.IceLite)
}
if conf.IcePorts.Min > 0 && conf.IcePorts.Max > 0 {
if err := settingEngine.SetEphemeralUDPPortRange(conf.IcePorts.Min, conf.IcePorts.Max); err != nil {
panic(err)