Use Pion's JSON support for ICE configuration.

This commit is contained in:
Juliusz Chroboczek
2021-01-01 22:20:58 +01:00
parent 2ec0c01458
commit dbec9df288
6 changed files with 42 additions and 53 deletions
+2 -6
View File
@@ -138,9 +138,7 @@ type rtpDownConnection struct {
func newDownConn(c group.Client, id string, remote conn.Up) (*rtpDownConnection, error) {
api := group.APIFromCodecs(remote.Codecs())
pc, err := api.NewPeerConnection(
group.ToConfiguration(group.ICEConfiguration()),
)
pc, err := api.NewPeerConnection(*group.ICEConfiguration())
if err != nil {
return nil, err
}
@@ -459,9 +457,7 @@ func pushConn(up *rtpUpConnection, g *group.Group, cs []group.Client) {
}
func newUpConn(c group.Client, id string, labels map[string]string) (*rtpUpConnection, error) {
pc, err := c.Group().API().NewPeerConnection(
group.ToConfiguration(group.ICEConfiguration()),
)
pc, err := c.Group().API().NewPeerConnection(*group.ICEConfiguration())
if err != nil {
return nil, err
}
+1 -1
View File
@@ -177,7 +177,7 @@ type clientMessage struct {
Candidate *webrtc.ICECandidateInit `json:"candidate,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Request rateMap `json:"request,omitempty"`
RTCConfiguration *group.RTCConfiguration `json:"rtcConfiguration,omitempty"`
RTCConfiguration *webrtc.Configuration `json:"rtcConfiguration,omitempty"`
}
type closeMessage struct {