mediamtx/internal/rtmp/client.go

19 lines
324 B
Go

package rtmp
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 &Conn{
rconn: rconn,
nconn: nconn,
}, nil
}