add participant id when client reconnect (#988)
This commit is contained in:
@@ -94,6 +94,7 @@ func (s *RTCService) validate(r *http.Request) (livekit.RoomName, routing.Partic
|
||||
autoSubParam := r.FormValue("auto_subscribe")
|
||||
publishParam := r.FormValue("publish")
|
||||
adaptiveStreamParam := r.FormValue("adaptive_stream")
|
||||
participantID := r.FormValue("sid")
|
||||
|
||||
if onlyName != "" {
|
||||
roomName = onlyName
|
||||
@@ -129,6 +130,9 @@ func (s *RTCService) validate(r *http.Request) (livekit.RoomName, routing.Partic
|
||||
Grants: claims,
|
||||
Region: region,
|
||||
}
|
||||
if pi.Reconnect {
|
||||
pi.ID = livekit.ParticipantID(participantID)
|
||||
}
|
||||
|
||||
if autoSubParam != "" {
|
||||
pi.AutoSubscribe = boolValue(autoSubParam)
|
||||
|
||||
Reference in New Issue
Block a user