Add stats for data channel and signal (#1198)

* Add stats for data channel and signal

* Solve comment
This commit is contained in:
cnderrauber
2022-11-30 14:53:19 +08:00
committed by GitHub
parent caae389717
commit 3c907ed460
13 changed files with 217 additions and 46 deletions
+6 -1
View File
@@ -589,7 +589,12 @@ func (c *RTCClient) PublishData(data []byte, kind livekit.DataPacket_Kind) error
},
}
return c.publisher.SendDataPacket(dp)
dpData, err := proto.Marshal(dp)
if err != nil {
return err
}
return c.publisher.SendDataPacket(dp, dpData)
}
func (c *RTCClient) GetPublishedTrackIDs() []string {