Skip to content
This repository has been archived by the owner on Mar 14, 2021. It is now read-only.

Commit

Permalink
Update trickle response for newest ION-SFU version and remove log sta…
Browse files Browse the repository at this point in the history
…tement
  • Loading branch information
TannerGabriel committed Jan 18, 2021
1 parent 45f1269 commit f33b568
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ion-sfu/pub-mediadevice/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type SendAnswer struct {

// TrickleResponse received from the sfu server
type TrickleResponse struct {
Params *webrtc.ICECandidateInit `json:params`
Params ResponseCandidate `json:params`
Method string `json:method`
}

Expand Down Expand Up @@ -278,11 +278,10 @@ func readMessage(connection *websocket.Conn, done chan struct{}) {
var trickleResponse TrickleResponse

if err := json.Unmarshal(message, &trickleResponse); err != nil {
log.Println("Unmarshaling trickle")
log.Fatal(err)
}

err := peerConnection.AddICECandidate(*trickleResponse.Params)
err := peerConnection.AddICECandidate(*trickleResponse.Params.Candidate)

if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit f33b568

Please sign in to comment.