Make sure client get participant info before track fired (#1147)

This commit is contained in:
cnderrauber
2022-11-07 14:50:45 +08:00
committed by GitHub
parent 05e88edf76
commit 0310aa9250
5 changed files with 63 additions and 1 deletions
+6
View File
@@ -297,6 +297,12 @@ func (r *RoomManager) StartSession(
AdaptiveStream: pi.AdaptiveStream,
AllowTCPFallback: allowFallback,
TURNSEnabled: r.config.IsTURNSEnabled(),
GetParticipantInfo: func(pID livekit.ParticipantID) *livekit.ParticipantInfo {
if p := room.GetParticipantBySid(pID); p != nil {
return p.ToProto()
}
return nil
},
})
if err != nil {
return err