mediamtx/internal/rtmp/client.go

16 lines
304 B
Go
Raw Normal View History

2021-04-03 09:39:19 +00:00
package rtmp
2021-04-03 09:35:45 +00:00
import (
"github.com/notedit/rtmp/format/rtmp"
)
// Dial connects to a server in reading mode.
func Dial(address string) (*Conn, error) {
rconn, nconn, err := rtmp.NewClient().Dial(address, rtmp.PrepareReading)
if err != nil {
return nil, err
}
return NewConn(rconn, nconn), nil
}