WebRTC consumer refactoring

This commit is contained in:
Alexey Khit
2023-02-16 14:29:25 +03:00
parent 4bf5034ce7
commit 6b3a2652b2
3 changed files with 4 additions and 6 deletions
+4
View File
@@ -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 ""
-6
View File
@@ -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",