WebRTC consumer refactoring
This commit is contained in:
@@ -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 ""
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user