sfu

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SfuSignalType_Join    = "join"
	SfuSignalType_Offer   = "offer"
	SfuSignalType_Answer  = "answer"
	SfuSignalType_Trickle = "trickle"
)

Variables

This section is empty.

Functions

func Signal

func Signal(sfuSignal *SfuSignal, targetPeerId string) (interface{}, error)

* 调用注册发送信号函数发送信号

Types

type SfuSignal

type SfuSignal struct {
	//四种类型
	SignalType string `json:"type,omitempty"`
	// 房间号
	Sid string `json:"sid,omitempty"`
	// 房间的原始节点
	PrimaryPeerId string `json:"sid,omitempty"`
	// join,offer,answer
	Sdp *webrtc.SessionDescription `json:"sdp,omitempty"`
	// candidate(trickle) publisher:0 or subscriber:1
	Target int `json:"target,omitempty"`
	// candidate(trickle)
	Candidate *webrtc.ICECandidateInit `json:"candidate,omitempty"`
}

func Transform

func Transform(payload map[string]interface{}) *SfuSignal

Jump to

Keyboard shortcuts

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