Add option to disable ice lite (#2862)

Some sfu's ice agent implementation has problem
to establish ice connection with lite ice agent,
add option to let client to disble it in server side.
This commit is contained in:
cnderrauber
2024-07-15 15:11:46 +08:00
committed by GitHub
parent faa66d1138
commit 5e1b18dab3
5 changed files with 13 additions and 3 deletions
+3
View File
@@ -379,6 +379,9 @@ func (r *RoomManager) StartSession(
pv := types.ProtocolVersion(pi.Client.Protocol)
rtcConf := *r.rtcConfig
rtcConf.SetBufferFactory(room.GetBufferFactory())
if pi.DisableICELite {
rtcConf.SettingEngine.SetLite(false)
}
sid := livekit.ParticipantID(guid.New(utils.ParticipantPrefix))
pLogger := rtc.LoggerWithParticipant(
rtc.LoggerWithRoom(logger.GetLogger(), room.Name(), room.ID()),
+4
View File
@@ -130,6 +130,7 @@ func (s *RTCService) validate(r *http.Request) (livekit.RoomName, routing.Partic
adaptiveStreamParam := r.FormValue("adaptive_stream")
participantID := r.FormValue("sid")
subscriberAllowPauseParam := r.FormValue("subscriber_allow_pause")
disableICELite := r.FormValue("disable_ice_lite")
if onlyName != "" {
roomName = onlyName
@@ -193,6 +194,9 @@ func (s *RTCService) validate(r *http.Request) (livekit.RoomName, routing.Partic
subscriberAllowPause := boolValue(subscriberAllowPauseParam)
pi.SubscriberAllowPause = &subscriberAllowPause
}
if disableICELite != "" {
pi.DisableICELite = boolValue(disableICELite)
}
return roomName, pi, http.StatusOK, nil
}