rtc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeVoIP     = Mode(opus.AppVoIP)
	ModeAudio    = Mode(opus.AppAudio)
	ModeLowdelay = Mode(opus.AppRestrictedLowdelay)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Mode

type Mode int

type Params

type Params struct {
	StunURL string

	MinPort    uint16
	MaxPort    uint16
	OverrideIP string

	OfferSDP string

	EnableWrite bool
	EnableRead  bool

	Rate     int
	Channels int

	Mode        Mode
	Complexity  int
	LossPercent int

	SimulateLossPercent int

	Debug bool
}

type Peer

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

func NewPeer

func NewPeer(params Params) (*Peer, error)

func (*Peer) Close

func (p *Peer) Close() error

func (*Peer) GetAnswer

func (p *Peer) GetAnswer() string

func (*Peer) GetOffer

func (p *Peer) GetOffer() string

func (*Peer) Read

func (p *Peer) Read() ([]int16, error)

func (*Peer) SetAnswer

func (p *Peer) SetAnswer(s string) error

func (*Peer) State

func (p *Peer) State() <-chan State

func (*Peer) Write

func (p *Peer) Write(pcm []int16) error

type State

type State string

func (State) IsConnected

func (s State) IsConnected() bool

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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