Documentation ¶
Index ¶
- func JoinErrs(errs ...error) error
- type Peer
- type Provider
- func (p *Provider) AddDataChannels(sessionID, peerID string, labels []string) error
- func (p *Provider) OnDatachannel(fn func(meta SignalMeta, dc *webrtc.DataChannel))
- func (p *Provider) OnRemoteStream(fn func(meta SignalMeta, receiver *webrtc.RTPReceiver, ...))
- func (p *Provider) Receive(remoteSignal []byte) ([]byte, error)
- func (p *Provider) Send(sessionID, peerID string, receiver *webrtc.RTPReceiver, ...) (*Peer, *webrtc.RTPSender, error)
- func (p *Provider) SetSettingEngine(se webrtc.SettingEngine)
- func (p *Provider) SetSignaler(signaler func(meta SignalMeta, signal []byte) ([]byte, error))
- type Signal
- type SignalMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Peer ¶
func (*Peer) LocalTracks ¶
func (r *Peer) LocalTracks() []webrtc.TrackLocal
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) AddDataChannels ¶
func (*Provider) OnDatachannel ¶
func (p *Provider) OnDatachannel(fn func(meta SignalMeta, dc *webrtc.DataChannel))
func (*Provider) OnRemoteStream ¶
func (p *Provider) OnRemoteStream(fn func(meta SignalMeta, receiver *webrtc.RTPReceiver, codec *webrtc.RTPCodecParameters))
func (*Provider) SetSettingEngine ¶
func (p *Provider) SetSettingEngine(se webrtc.SettingEngine)
func (*Provider) SetSignaler ¶
func (p *Provider) SetSignaler(signaler func(meta SignalMeta, signal []byte) ([]byte, error))
type Signal ¶
type Signal struct { Metadata SignalMeta `json:"metadata"` Encodings *webrtc.RTPCodingParameters `json:"encodings,omitempty"` ICECandidates []webrtc.ICECandidate `json:"iceCandidates,omitempty"` ICEParameters webrtc.ICEParameters `json:"iceParameters,omitempty"` DTLSParameters webrtc.DTLSParameters `json:"dtlsParameters,omitempty"` CodecParameters *webrtc.RTPCodecParameters `json:"codecParameters,omitempty"` SCTPCapabilities *webrtc.SCTPCapabilities `json:"sctpCapabilities,omitempty"` }
type SignalMeta ¶
Click to show internal directories.
Click to hide internal directories.