mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-25 20:41:59 -08:00
18 lines
324 B
Go
18 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
|
|
}
|