sfu node always pick ice controlled role(lite) (#322)

* sfu node always pick ice controlled role(lite)

* fix test case

Co-authored-by: cnderrauber <zengjie9004@gmail.com>
This commit is contained in:
cnderrauber
2022-01-10 12:58:10 +08:00
committed by GitHub
co-authored by cnderrauber
parent 9d74d99fed
commit 54e13d20bb
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -62,6 +62,7 @@ func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, err
s := webrtc.SettingEngine{
LoggerFactory: serverlogger.LoggerFactory(),
}
s.SetLite(true)
if externalIP != "" {
s.SetNAT1To1IPs([]string{externalIP}, webrtc.ICECandidateTypeHost)
+2
View File
@@ -126,6 +126,8 @@ func NewRTCClient(conn *websocket.Conn) (*RTCClient, error) {
conf := rtc.WebRTCConfig{
Configuration: rtcConf,
}
conf.SettingEngine.SetLite(false)
conf.SettingEngine.SetAnsweringDTLSRole(webrtc.DTLSRoleClient)
codecs := []*livekit.Codec{
{
Mime: "audio/opus",