diff --git a/pkg/webrtc/conn.go b/pkg/webrtc/conn.go index 059dd545..313a3fb4 100644 --- a/pkg/webrtc/conn.go +++ b/pkg/webrtc/conn.go @@ -154,6 +154,10 @@ func (c *Conn) GetCompleteAnswer() (answer string, err error) { return c.Conn.LocalDescription().SDP, nil } +func (c *Conn) AddCandidate(candidate string) { + _ = c.Conn.AddICECandidate(webrtc.ICECandidateInit{Candidate: candidate}) +} + func (c *Conn) remote() string { if c.Conn == nil { return "" diff --git a/pkg/webrtc/consumer.go b/pkg/webrtc/consumer.go index a9019af9..785ef2f5 100644 --- a/pkg/webrtc/consumer.go +++ b/pkg/webrtc/consumer.go @@ -106,12 +106,6 @@ func (c *Conn) AddTrack(media *streamer.Media, track *streamer.Track) *streamer. panic("wrong direction") } -// - -func (c *Conn) AddCandidate(candidate string) { - _ = c.Conn.AddICECandidate(webrtc.ICECandidateInit{Candidate: candidate}) -} - func (c *Conn) MarshalJSON() ([]byte, error) { info := &streamer.Info{ Type: "WebRTC client", diff --git a/pkg/webrtc/helper.go b/pkg/webrtc/helpers.go similarity index 100% rename from pkg/webrtc/helper.go rename to pkg/webrtc/helpers.go