stream-server/rtmp/amf/decode.go

14 lines
273 B
Go
Raw Normal View History

2023-08-10 23:53:23 +05:00
package amf
type AMFObj map[interface{}]interface{}
func DecodeAMF(data *[]byte) (AMFObj, error) {
obj := make(AMFObj)
test := make(AMFObj)
obj[0] = "connect"
obj[1] = float64(1)
2023-08-10 23:53:23 +05:00
obj[2] = test
test["tcUrl"] = "rtmp://test-domain.nil/Desktop/tmp"
2023-08-10 23:53:23 +05:00
return obj, nil
}