use full candidateInit, update encoding

This commit is contained in:
David Zhao
2020-12-03 21:58:25 -08:00
parent bca8090b41
commit c64ecc4603
7 changed files with 59 additions and 52 deletions
+2 -4
View File
@@ -74,15 +74,13 @@ func NewParticipant(conf *WebRTCConfig, sc SignalConnection, name string) (*Part
if c == nil {
return
}
ci := c.ToJSON()
// write candidate
err := sc.WriteResponse(&livekit.SignalResponse{
Message: &livekit.SignalResponse_Trickle{
Trickle: &livekit.Trickle{
Candidate: ci.Candidate,
// TODO: there are other candidateInit fields that we might want
},
Trickle: ToProtoTrickle(ci),
},
})
if err != nil {