sfu

package
v0.0.0-...-231556c Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SfuModule

func SfuModule() *sfu

Types

type ISignalServer

type ISignalServer interface {
	OnClose(f func())
	Run() error
	Shutdown() error
}

type JSONSignal

type JSONSignal struct {
	*forwarder.Peer
}

func NewJSONSignal

func NewJSONSignal(p *forwarder.Peer) *JSONSignal

func (*JSONSignal) Handle

func (p *JSONSignal) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request)

Handle incoming RPC call events like join, answer, offer and trickle

type Join

type Join struct {
	GID    string                    `json:"sid"`
	UID    string                    `json:"uid"`
	Offer  webrtc.SessionDescription `json:"offer"`
	Config forwarder.JoinConfig      `json:"config"`
}

Join message sent when initializing a peer connection

type Negotiation

type Negotiation struct {
	Desc webrtc.SessionDescription `json:"desc"`
}

Negotiation message sent when renegotiating the peer connection

type SfuSettings

type SfuSettings struct {
	ListenAddr string `json:"listenAddr" mapstructure:"listenAddr"`
	Cert       string `json:"cert" mapstructure:"cert"`
	Key        string `json:"key" mapstructure:"key"`
}

type SignalServer

type SignalServer struct {
	// contains filtered or unexported fields
}

func NewSignalServer

func NewSignalServer(ctx context.Context, settings SignalServerSettings) *SignalServer

func (*SignalServer) OnClose

func (ss *SignalServer) OnClose(f func())

func (*SignalServer) Run

func (ss *SignalServer) Run() error

func (*SignalServer) Shutdown

func (ss *SignalServer) Shutdown() error

type SignalServerSettings

type SignalServerSettings struct {
	// contains filtered or unexported fields
}

type Trickle

type Trickle struct {
	Target    int                     `json:"target"`
	Candidate webrtc.ICECandidateInit `json:"candidate"`
}

Trickle message sent when renegotiating the peer connection

Jump to

Keyboard shortcuts

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