Documentation ¶
Index ¶
- Constants
- func CandidateHostPriority(network string, index int) uint32
- func CandidateICE(network, host, port string, priority uint32) string
- func GetCachedPublicIP() (net.IP, error)
- func GetPublicIP() (net.IP, error)
- func IsIP(host string) bool
- func LookupIP(address string) (string, error)
- func MimeType(codec *core.Codec) string
- func NewAPI() (*webrtc.API, error)
- func NewCandidate(network, address string) (string, error)
- func NewServerAPI(network, address string, filters *Filters) (*webrtc.API, error)
- func RegisterDefaultCodecs(m *webrtc.MediaEngine) error
- func SkipNonMediaCodecs(input []*core.Codec) (output []*core.Codec)
- func UnmarshalICEServers(b []byte) ([]webrtc.ICEServer, error)
- func UnmarshalMedias(descriptions []*sdp.MediaDescription) (medias []*core.Media)
- func WithResampling(medias []*core.Media) []*core.Media
- type Conn
- func (c *Conn) AddCandidate(candidate string) error
- func (c *Conn) AddTrack(media *core.Media, codec *core.Codec, track *core.Receiver) error
- func (c *Conn) Close() error
- func (c *Conn) CreateCompleteOffer(medias []*core.Media) (string, error)
- func (c *Conn) CreateOffer(medias []*core.Media) (string, error)
- func (c *Conn) GetAnswer() (answer string, err error)
- func (c *Conn) GetCompleteAnswer(candidates []string, filter func(*webrtc.ICECandidate) bool) (string, error)
- func (c *Conn) GetMedias() []*core.Media
- func (c *Conn) GetTrack(media *core.Media, codec *core.Codec) (*core.Receiver, error)
- func (c *Conn) MarshalJSON() ([]byte, error)
- func (c *Conn) SetAnswer(answer string) (err error)
- func (c *Conn) SetOffer(offer string) (err error)
- func (c *Conn) Start() error
- type Filters
- type Track
- func (t *Track) Bind(context webrtc.TrackLocalContext) (webrtc.RTPCodecParameters, error)
- func (t *Track) ID() string
- func (t *Track) Kind() webrtc.RTPCodecType
- func (t *Track) RID() string
- func (t *Track) StreamID() string
- func (t *Track) Unbind(context webrtc.TrackLocalContext) error
- func (t *Track) WriteRTP(payloadType uint8, packet *rtp.Packet) (err error)
Constants ¶
View Source
const PriorityHostTCPPassive uint32 = 0x001F_FFFF | 99<<24 | 4<<21 // tcp passive
View Source
const PriorityHostUDP uint32 = 0x001F_FFFF | 126<<24 | 7<<21 // udp
View Source
const ReceiveMTU = 1472
ReceiveMTU = Ethernet MTU (1500) - IP Header (20) - UDP Header (8) https://ffmpeg.org/ffmpeg-all.html#Muxer
Variables ¶
This section is empty.
Functions ¶
func CandidateHostPriority ¶
CandidateHostPriority (lower indexes has a higher priority)
func CandidateICE ¶
func GetCachedPublicIP ¶
func GetPublicIP ¶
GetPublicIP example from https://github.com/pion/stun
func NewCandidate ¶
func NewServerAPI ¶
func RegisterDefaultCodecs ¶
func RegisterDefaultCodecs(m *webrtc.MediaEngine) error
func UnmarshalICEServers ¶
func UnmarshalMedias ¶
Types ¶
type Conn ¶
type Conn struct { core.Connection core.Listener Mode core.Mode `json:"mode"` // contains filtered or unexported fields }
func (*Conn) AddCandidate ¶
func (*Conn) CreateCompleteOffer ¶
func (*Conn) GetCompleteAnswer ¶
func (c *Conn) GetCompleteAnswer(candidates []string, filter func(*webrtc.ICECandidate) bool) (string, error)
GetCompleteAnswer - get SDP answer with candidates inside
func (*Conn) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.