From 8bb46637bb6687f87551b6ad19c2744fae97ab3e Mon Sep 17 00:00:00 2001 From: cnderrauber Date: Fri, 22 Apr 2022 12:41:43 +0800 Subject: [PATCH] enable accept aggressive nomination by default (#644) --- config-sample.yaml | 6 +++--- pkg/config/config.go | 2 +- pkg/rtc/config.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config-sample.yaml b/config-sample.yaml index 32d4068df..2e1a10985 100644 --- a/config-sample.yaml +++ b/config-sample.yaml @@ -68,9 +68,9 @@ rtc: # - en0 # excludes: # - docker0 - # # accept ice aggressive nomination, when set to true, server will accept client's aggressive nomination to update - # # selected candidate pair. This is useful when client has aggressive nomination in special network environment. - # accept_aggressive_nomination: true + # # some clients like chrome use aggressive nomination in special network environment to update selected candidate pair, + # # by default server will accept the updated nomination. If get problem with this, set to true to reject ice aggressive nomination + # reject_aggressive_nomination: true # when enabled, LiveKit will expose prometheus metrics on :6789/metrics # prometheus_port: 6789 diff --git a/pkg/config/config.go b/pkg/config/config.go index 840df5c01..ec592eb81 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -61,7 +61,7 @@ type RTCConfig struct { UseExternalIP bool `yaml:"use_external_ip"` UseICELite bool `yaml:"use_ice_lite,omitempty"` Interfaces InterfacesConfig `yaml:"interfaces"` - AcceptAggressiveNomination bool `yaml:"accept_aggressive_nomination"` + RejectAggressiveNomination bool `yaml:"reject_aggressive_nomination"` // Number of packets to buffer for NACK PacketBufferSize int `yaml:"packet_buffer_size,omitempty"` diff --git a/pkg/rtc/config.go b/pkg/rtc/config.go index 8885f8caf..52d5cae1d 100644 --- a/pkg/rtc/config.go +++ b/pkg/rtc/config.go @@ -189,7 +189,7 @@ func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, err } } - if rtcConf.AcceptAggressiveNomination { + if !rtcConf.RejectAggressiveNomination { s.SetICEAcceptAggressiveNomination(true) }