webrtc

package module
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CandidateProcedureName = "webrtcCandidate"
	SdpProcedureName       = "webrtcSdp"
)

Functions

func SignalAnswer

func SignalAnswer(conn *webrtc.PeerConnection, cli rpc.Client, lib rpc.Library) error

SignalAnswer sets up the WebRTC answer side of the signaling process for a peer connection.

The underlying RPC system must be capable of concurrent, as well as recursive calls. Two procedures will be added, whose names are determined by the global variables CandidateProcedureName and SdpProcedureName.

func SignalOffer

func SignalOffer(conn *webrtc.PeerConnection, cli rpc.Client, lib rpc.Library) (func() error, error)

SignalOffer sets up the WebRTC offer side of the signaling process for a peer connection.

The underlying RPC system must be capable of concurrent, as well as recursive calls. Two procedures will be added, whose names are determined by the global variables CandidateProcedureName and SdpProcedureName.

The returned function can be used to start the initial process, as well as renegotiation.

Types

type Channel

type Channel struct {
	V *webrtc.DataChannel
	// contains filtered or unexported fields
}

func ChannelNew added in v0.1.9

func ChannelNew(v *webrtc.DataChannel) *Channel

ChannelNew wraps a webrtc.DataChannel to fit the msg framework.

func (*Channel) Close

func (x *Channel) Close() error

func (*Channel) CloseHandle added in v0.1.9

func (x *Channel) CloseHandle(fn func())

func (*Channel) OpenHandle added in v0.1.9

func (x *Channel) OpenHandle(fn func())

func (*Channel) ReaderChain

func (x *Channel) ReaderChain(dst msg.ReaderTaker) error

func (*Channel) Writer

func (x *Channel) Writer() (msg.Writer, error)

The returned value is also a msg.Canceler. Not concurrent safe.

type Sdp added in v0.1.6

type Sdp struct {
	Type   webrtc.SDPType
	String string
}

Sdp separates the webrtc.SessionDescription exported part, making it encoding agnostic.

Jump to

Keyboard shortcuts

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