Fix loop request, ex. camera1: ffmpeg:camera1

This commit is contained in:
Alex X
2024-11-09 18:17:41 +03:00
parent 2c34a17d88
commit 340fd81778
4 changed files with 16 additions and 0 deletions
+5
View File
@@ -25,6 +25,7 @@ type Info interface {
SetSource(string)
SetURL(string)
WithRequest(*http.Request)
GetSource() string
}
// Connection just like webrtc.PeerConnection
@@ -123,6 +124,10 @@ func (c *Connection) WithRequest(r *http.Request) {
c.UserAgent = r.UserAgent()
}
func (c *Connection) GetSource() string {
return c.Source
}
// Create like os.Create, init Consumer with existing Transport
func Create(w io.Writer) (*Connection, error) {
return &Connection{Transport: w}, nil