rtmp

package
v0.0.0-...-c3ad350 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 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

func DialPlay(rawURL string) (*flv.Producer, error)

func DialPublish

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

func PutUint24

func PutUint24(b []byte, v uint32)

func Uint24

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

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

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Producer

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

func (*Conn) Read

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

Read - convert RTMP to FLV format

func (*Conn) ReadCommands

func (c *Conn) ReadCommands() error

func (*Conn) Write

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

Write - convert FLV format to RTMP format

func (*Conn) WriteStart

func (c *Conn) WriteStart() error

Jump to

Keyboard shortcuts

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