Fix Roborock support
This commit is contained in:
@@ -111,6 +111,9 @@ func (c *Client) Connect() error {
|
|||||||
_ = c.SendICEtoRobot(msg.ToJSON().Candidate, "0")
|
_ = c.SendICEtoRobot(msg.ToJSON().Candidate, "0")
|
||||||
}
|
}
|
||||||
case pion.PeerConnectionState:
|
case pion.PeerConnectionState:
|
||||||
|
if msg == pion.PeerConnectionStateConnecting {
|
||||||
|
return
|
||||||
|
}
|
||||||
// unblocking write to channel
|
// unblocking write to channel
|
||||||
select {
|
select {
|
||||||
case connected <- msg == pion.PeerConnectionStateConnected:
|
case connected <- msg == pion.PeerConnectionStateConnected:
|
||||||
@@ -131,8 +134,9 @@ func (c *Client) Connect() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("[roborock] offer\n%s", pc.LocalDescription().SDP)
|
offer := pc.LocalDescription()
|
||||||
if err = c.SendSDPtoRobot(pc.LocalDescription()); err != nil {
|
log.Printf("[roborock] offer\n%s", offer.SDP)
|
||||||
|
if err = c.SendSDPtoRobot(offer); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user