proto

package
v0.0.0-...-64b69da Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: MIT Imports: 3 Imported by: 0

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"
	ClientAlreadyJoined  = "peer-already-joined"
	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

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

func BuildUserInfoKey

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

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

func MarshalTrackField

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

func UnmarshalTrackField

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

Types

type MediaInfo

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

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

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

type NodeInfo

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

func UnmarshalNodeField

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

type TrackInfo

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

type UserInfo struct {
	DC  string
	RID string
	UID string
}

func ParseUserInfo

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

Jump to

Keyboard shortcuts

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