proto

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MIT Imports: 3 Imported by: 10

Documentation

Index

Constants

View Source
const (
	// client to ion
	ClientLogin       = "login"
	ClientJoin        = "join"
	ClientLeave       = "leave"
	ClientPublish     = "publish"
	ClientUnPublish   = "unpublish"
	ClientSubscribe   = "subscribe"
	ClientUnSubscribe = "unsubscribe"
	ClientClose       = "close"
	ClientBroadcast   = "broadcast"
	ClientTrickleICE  = "trickle"

	// ion to client
	ClientOnJoin         = "peer-join"
	ClientOnLeave        = "peer-leave"
	ClientOnStreamAdd    = "stream-add"
	ClientOnStreamRemove = "stream-remove"

	// ion to islb
	IslbFindService  = "findService"
	IslbGetPubs      = "getPubs"
	IslbGetMediaInfo = "getMediaInfo"
	IslbRelay        = "relay"
	IslbUnrelay      = "unRelay"

	IslbKeepAlive      = "keepAlive"
	IslbClientOnJoin   = ClientOnJoin
	IslbClientOnLeave  = ClientOnLeave
	IslbOnStreamAdd    = ClientOnStreamAdd
	IslbOnStreamRemove = ClientOnStreamRemove
	IslbOnBroadcast    = ClientBroadcast

	SFUTrickleICE   = ClientTrickleICE
	SFUStreamRemove = ClientOnStreamRemove

	IslbID = "islb"
)

Variables

This section is empty.

Functions

func BuildMediaInfoKey added in v0.2.0

func BuildMediaInfoKey(dc string, rid string, nid string, mid string) string

func BuildUserInfoKey added in v0.2.0

func BuildUserInfoKey(dc string, rid string, uid string) string

func GetPubMediaPath

func GetPubMediaPath(rid, mid string, ssrc uint32) string

func GetPubMediaPathKey

func GetPubMediaPathKey(rid string) string

func GetPubNodePath

func GetPubNodePath(rid, uid string) string

func GetRIDMIDUIDFromMediaKey

func GetRIDMIDUIDFromMediaKey(key string) (string, string, string)

func GetUIDFromMID

func GetUIDFromMID(mid string) string

func MarshalNodeField added in v0.2.0

func MarshalNodeField(node NodeInfo) (string, string, error)

func MarshalTrackField added in v0.2.0

func MarshalTrackField(id string, infos []TrackInfo) (string, string, error)

func UnmarshalTrackField added in v0.2.0

func UnmarshalTrackField(key string, value string) (string, *[]TrackInfo, error)

Types

type MediaInfo added in v0.2.0

type MediaInfo struct {
	DC  string //Data Center ID
	RID string //Room ID
	NID string //Node ID
	MID string //Media ID
	UID string //User ID
}

func ParseMediaInfo added in v0.2.0

func ParseMediaInfo(key string) (*MediaInfo, error)

dc1/room1/sfu-tU2GInE5Lfuc/media/pub/7e97c1e8-c80a-4c69-81b0-27efc83e6120#NYYQLV

type NodeInfo added in v0.2.0

type NodeInfo struct {
	Name string `json:"name"`
	ID   string `json:"id"`
	Type string `json:"type"` // origin | shadow
}

func UnmarshalNodeField added in v0.2.0

func UnmarshalNodeField(key string, value string) (*NodeInfo, error)

type TrackInfo added in v0.2.0

type TrackInfo struct {
	ID      string `json:"id"`
	Ssrc    int    `json:"ssrc"`
	Payload int    `json:"pt"`
	Type    string `json:"type"`
	Codec   string `json:"codec"`
	Fmtp    string `json:"fmtp"`
}

type UserInfo added in v0.2.0

type UserInfo struct {
	DC  string
	RID string
	UID string
}

func ParseUserInfo added in v0.2.0

func ParseUserInfo(key string) (*UserInfo, error)

Jump to

Keyboard shortcuts

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