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
|
return c.Conn.LocalDescription().SDP, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Conn) AddCandidate(candidate string) {
|
||||||
|
_ = c.Conn.AddICECandidate(webrtc.ICECandidateInit{Candidate: candidate})
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Conn) remote() string {
|
func (c *Conn) remote() string {
|
||||||
if c.Conn == nil {
|
if c.Conn == nil {
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
@@ -106,12 +106,6 @@ func (c *Conn) AddTrack(media *streamer.Media, track *streamer.Track) *streamer.
|
|||||||
panic("wrong direction")
|
panic("wrong direction")
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
func (c *Conn) AddCandidate(candidate string) {
|
|
||||||
_ = c.Conn.AddICECandidate(webrtc.ICECandidateInit{Candidate: candidate})
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Conn) MarshalJSON() ([]byte, error) {
|
func (c *Conn) MarshalJSON() ([]byte, error) {
|
||||||
info := &streamer.Info{
|
info := &streamer.Info{
|
||||||
Type: "WebRTC client",
|
Type: "WebRTC client",
|
||||||
|
|||||||
Reference in New Issue
Block a user