mark final ice candidate (#2871)

* add IsFinal flag to last ice candidate

* deps
This commit is contained in:
Paul Wells
2024-07-16 09:50:55 -07:00
committed by GitHub
parent 8605ada485
commit c905336fec
6 changed files with 23 additions and 16 deletions
+6 -3
View File
@@ -264,10 +264,13 @@ func (p *ParticipantImpl) sendDisconnectUpdatesForReconnect() error {
})
}
func (p *ParticipantImpl) sendICECandidate(c *webrtc.ICECandidate, target livekit.SignalTarget) error {
trickle := ToProtoTrickle(c.ToJSON())
trickle.Target = target
func (p *ParticipantImpl) sendICECandidate(ic *webrtc.ICECandidate, target livekit.SignalTarget) error {
prevIC := p.icQueue.Swap(ic)
if prevIC == nil {
return nil
}
trickle := ToProtoTrickle(prevIC.ToJSON(), target, ic == nil)
p.params.Logger.Debugw("sending ICE candidate", "transport", target, "trickle", logger.Proto(trickle))
return p.writeMessage(&livekit.SignalResponse{