mirror of
https://github.com/livekit/livekit.git
synced 2026-11-23 02:29:22 +00:00
correctly send participant updates
This commit is contained in:
1 parent
a6c4db2cb3
commit
bca8090b41
4 files changed
+20
-9
No files matched your search
@@ -184,6 +184,7 @@ func (c *RTCClient) Run() error {
|
||||
case *livekit.SignalResponse_Join:
|
||||
c.AppendLog("join accepted, sending offer..")
|
||||
c.localParticipant = msg.Join.Participant
|
||||
c.AppendLog("other participants", "count", len(msg.Join.OtherParticipants))
|
||||
|
||||
// Create an offer to send to the other process
|
||||
offer, err := c.PeerConn.CreateOffer(nil)
|
||||
@@ -240,6 +241,10 @@ func (c *RTCClient) Run() error {
|
||||
if err := c.PeerConn.AddICECandidate(*candidateInit); err != nil {
|
||||
return err
|
||||
}
|
||||
case *livekit.SignalResponse_Update:
|
||||
for _, p := range msg.Update.Participants {
|
||||
c.AppendLog("participant update", "id", p.Id, "state", p.State.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user