Skip to content

Commit

Permalink
Wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 committed Aug 22, 2024
1 parent ace4d2f commit 4a3e011
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions service/rtc/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func newMessage(s *session, msgType MessageType, data []byte) Message {
}
}

func marshalHostCandidate(c *webrtc.ICECandidate) string {
func marshalHostCandidate(c *webrtc.ICECandidate) webrtc.ICECandidateInit {
val := c.Foundation
if val == " " {
val = ""
Expand All @@ -80,7 +80,11 @@ func marshalHostCandidate(c *webrtc.ICECandidate) string {
c.RelatedPort)
}

return val
return webrtc.ICECandidateInit{
Candidate: fmt.Sprintf("candidate:%s", val),
SDPMid: new(string),
SDPMLineIndex: new(uint16),
}
}

func newICEMessage(s *session, c *webrtc.ICECandidate) (Message, error) {
Expand Down

0 comments on commit 4a3e011

Please sign in to comment.