biz

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close func

func Entry

func Entry(method string, peer *signal.Peer, msg json.RawMessage, accept signal.RespondFunc, reject signal.RejectFunc)

Entry is the biz entry

func Init

func Init(dcID, nodeID, rpcID, eventID string, natsURL string)

Init func

func WatchServiceNodes

func WatchServiceNodes(service string, state discovery.NodeStateType, node discovery.Node)

WatchServiceNodes .

Types

type BroadcastMsg added in v0.3.0

type BroadcastMsg struct {
	RoomInfo
	Info json.RawMessage `json:"info"`
}

type CloseMsg added in v0.3.0

type CloseMsg struct {
	LeaveMsg
}

type JoinMsg added in v0.3.0

type JoinMsg struct {
	RoomInfo
	Info UserInfo `json:"info"`
}

type LeaveMsg added in v0.3.0

type LeaveMsg struct {
	RoomInfo
	Info UserInfo `json:"info"`
}

type LoginMsg added in v0.3.0

type LoginMsg struct {
}

type MediaInfo added in v0.3.0

type MediaInfo struct {
	Mid string `json:"mid"`
}

type PublishMsg added in v0.3.0

type PublishMsg struct {
	RoomInfo
	RTCInfo
	Options PublishOptions `json:"options"`
}

type PublishOptions added in v0.3.0

type PublishOptions struct {
	Codec      string `json:"codec"`
	Resolution string `json:"resolution"`
	Bandwidth  int    `json:"bandwidth"`
	Audio      bool   `json:"audio"`
	Video      bool   `json:"video"`
	Screen     bool   `json:"screen"`
}

type PublishResponseMsg added in v0.3.1

type PublishResponseMsg struct {
	MediaInfo
	RTCInfo
	Tracks TrackMap `json:"tracks"`
}

type RTCInfo added in v0.3.1

type RTCInfo struct {
	Jsep webrtc.SessionDescription `json:"jsep"`
}

type RoomInfo added in v0.3.0

type RoomInfo struct {
	Rid string `json:"rid"`
	Uid string `json:"uid"`
}

type StreamAddMsg added in v0.3.1

type StreamAddMsg struct {
	RoomInfo
	MediaInfo
	Info   UserInfo `json:"info"`
	Tracks TrackMap `json:"tracks"`
}

type StreamRemoveMsg added in v0.3.1

type StreamRemoveMsg struct {
	RoomInfo
	MediaInfo
}

type SubscribeMsg added in v0.3.0

type SubscribeMsg struct {
	RoomInfo
	MediaInfo
	RTCInfo
}

type SubscribeResponseMsg added in v0.3.1

type SubscribeResponseMsg struct {
	MediaInfo
	RTCInfo
}

type TrackInfo added in v0.3.1

type TrackInfo struct {
	Type  string `json:"type"`
	Codec string `json:"codec"`
	FMTP  string `json:"fmtp"`
	ID    string `json:"id"`
	PT    int    `json:"pt"`
	SSRC  int64  `json:"ssrc"`
}

type TrackMap added in v0.3.1

type TrackMap map[string][]TrackInfo

type TrickleMsg added in v0.3.0

type TrickleMsg struct {
	RoomInfo
	MediaInfo
	Info    json.RawMessage `json:"info"`
	Trickle json.RawMessage `json:"trickle"`
}

type UnpublishMsg added in v0.3.0

type UnpublishMsg struct {
	RoomInfo
	MediaInfo
}

type UnsubscribeMsg added in v0.3.0

type UnsubscribeMsg struct {
	MediaInfo
}

type UserInfo added in v0.3.0

type UserInfo struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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