webrtc

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCachedPublicIP

func GetCachedPublicIP() (net.IP, error)

func GetPublicIP

func GetPublicIP() (net.IP, error)

GetPublicIP example from https://github.com/pion/stun

func IsIP

func IsIP(host string) bool

func LookupIP

func LookupIP(address string) (string, error)

func MimeType

func MimeType(codec *streamer.Codec) string

func NewAPI

func NewAPI(address string) (*webrtc.API, error)

func NewCandidate

func NewCandidate(network, address string) (string, error)

func RegisterDefaultCodecs

func RegisterDefaultCodecs(m *webrtc.MediaEngine) error

Types

type Conn

type Conn struct {
	streamer.Element

	UserAgent string

	Conn *webrtc.PeerConnection
	// contains filtered or unexported fields
}

func (*Conn) AddCandidate

func (c *Conn) AddCandidate(candidate string)

func (*Conn) AddTrack

func (c *Conn) AddTrack(media *streamer.Media, track *streamer.Track) *streamer.Track

func (*Conn) GetAnswer

func (c *Conn) GetAnswer() (answer string, err error)

func (*Conn) GetCompleteAnswer

func (c *Conn) GetCompleteAnswer() (answer string, err error)

func (*Conn) GetMedias

func (c *Conn) GetMedias() []*streamer.Media

func (*Conn) Init

func (c *Conn) Init()

func (*Conn) MarshalJSON

func (c *Conn) MarshalJSON() ([]byte, error)

func (*Conn) SetOffer

func (c *Conn) SetOffer(offer string) (err error)

Jump to

Keyboard shortcuts

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