rtmp

package
v1.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 12 Imported by: 0

README

Logs

request  []interface {}{"connect", 1, map[string]interface {}{"app":"s", "flashVer":"FMLE/3.0 (compatible; FMSc/1.0)", "tcUrl":"rtmps://xxx.rtmp.t.me/s/xxxxx"}}
response []interface {}{"_result", 1, map[string]interface {}{"capabilities":31, "fmsVer":"FMS/3,0,1,123"}, map[string]interface {}{"code":"NetConnection.Connect.Success", "description":"Connection succeeded.", "level":"status", "objectEncoding":0}}
request  []interface {}{"releaseStream", 2, interface {}(nil), "xxxxx"}
request  []interface {}{"FCPublish", 3, interface {}(nil), "xxxxx"}
request  []interface {}{"createStream", 4, interface {}(nil)}
response []interface {}{"_result", 2, interface {}(nil)}
response []interface {}{"_result", 4, interface {}(nil), 1}
request  []interface {}{"publish", 5, interface {}(nil), "xxxxx", "live"}
response []interface {}{"onStatus", 0, interface {}(nil), map[string]interface {}{"code":"NetStream.Publish.Start", "description":"xxxxx is now published", "detail":"xxxxx", "level":"status"}}

Documentation

Index

Constants

View Source
const (
	TypeSetPacketSize   = 1
	TypeServerBandwidth = 5
	TypeClientBandwidth = 6
	TypeAudio           = 8
	TypeVideo           = 9
	TypeData            = 18
	TypeCommand         = 20
)
View Source
const (
	CommandConnect       = "connect"
	CommandReleaseStream = "releaseStream"
	CommandFCPublish     = "FCPublish"
	CommandCreateStream  = "createStream"
	CommandPublish       = "publish"
	CommandPlay          = "play"
)

Variables

This section is empty.

Functions

func DialPlay added in v1.8.0

func DialPlay(rawURL string) (core.Producer, error)

func DialPublish added in v1.8.0

func DialPublish(rawURL string) (io.Writer, error)

func PutUint24 added in v1.7.0

func PutUint24(b []byte, v uint32)

func Uint24 added in v1.7.0

func Uint24(b []byte) uint32

Types

type Conn

type Conn struct {
	App    string
	Stream string
	Intent string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(conn net.Conn, u *url.URL) (*Conn, error)

func NewServer added in v1.8.0

func NewServer(conn net.Conn) (*Conn, error)

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Producer added in v1.8.0

func (c *Conn) Producer() (core.Producer, error)

func (*Conn) Read added in v1.8.0

func (c *Conn) Read(p []byte) (n int, err error)

Read - convert RTMP to FLV format

func (*Conn) ReadCommands added in v1.8.0

func (c *Conn) ReadCommands() error

func (*Conn) Write added in v1.8.0

func (c *Conn) Write(p []byte) (n int, err error)

Write - convert FLV format to RTMP format

func (*Conn) WriteStart added in v1.8.0

func (c *Conn) WriteStart() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL