mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 04:22:30 +00:00
add config to accept aggressive nomination (#642)
This commit is contained in:
1 parent
2b6a304b27
commit
124d628c0a
5 files changed
+36
-26
No files matched your search
+11
-10
@@ -51,16 +51,17 @@ type Config struct {
|
||||
}
|
||||
|
||||
type RTCConfig struct {
|
||||
UDPPort uint32 `yaml:"udp_port,omitempty"`
|
||||
TCPPort uint32 `yaml:"tcp_port,omitempty"`
|
||||
ICEPortRangeStart uint32 `yaml:"port_range_start,omitempty"`
|
||||
ICEPortRangeEnd uint32 `yaml:"port_range_end,omitempty"`
|
||||
NodeIP string `yaml:"node_ip,omitempty"`
|
||||
STUNServers []string `yaml:"stun_servers,omitempty"`
|
||||
TURNServers []TURNServer `yaml:"turn_servers,omitempty"`
|
||||
UseExternalIP bool `yaml:"use_external_ip"`
|
||||
UseICELite bool `yaml:"use_ice_lite,omitempty"`
|
||||
Interfaces InterfacesConfig `yaml:"interfaces"`
|
||||
UDPPort uint32 `yaml:"udp_port,omitempty"`
|
||||
TCPPort uint32 `yaml:"tcp_port,omitempty"`
|
||||
ICEPortRangeStart uint32 `yaml:"port_range_start,omitempty"`
|
||||
ICEPortRangeEnd uint32 `yaml:"port_range_end,omitempty"`
|
||||
NodeIP string `yaml:"node_ip,omitempty"`
|
||||
STUNServers []string `yaml:"stun_servers,omitempty"`
|
||||
TURNServers []TURNServer `yaml:"turn_servers,omitempty"`
|
||||
UseExternalIP bool `yaml:"use_external_ip"`
|
||||
UseICELite bool `yaml:"use_ice_lite,omitempty"`
|
||||
Interfaces InterfacesConfig `yaml:"interfaces"`
|
||||
AcceptAggressiveNomination bool `yaml:"accept_aggressive_nomination"`
|
||||
|
||||
// Number of packets to buffer for NACK
|
||||
PacketBufferSize int `yaml:"packet_buffer_size,omitempty"`
|
||||
|
||||
@@ -189,6 +189,10 @@ func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, err
|
||||
}
|
||||
}
|
||||
|
||||
if rtcConf.AcceptAggressiveNomination {
|
||||
s.SetICEAcceptAggressiveNomination(true)
|
||||
}
|
||||
|
||||
if len(rtcConf.Interfaces.Includes) != 0 || len(rtcConf.Interfaces.Excludes) != 0 {
|
||||
includes := rtcConf.Interfaces.Includes
|
||||
excludes := rtcConf.Interfaces.Excludes
|
||||
|
||||
Reference in new issue
Block a user