Documentation ¶
Overview ¶
Package rtc consists of a RTC to fetch tracks from other SFU
Index ¶
- Variables
- func TrackSame(t1 *pb.Subscription, t2 *webrtc.TrackRemote) bool
- type RTC
- func (r *RTC) GetSubStats() webrtc.StatsReport
- func (r *RTC) Run(remoteSid, localSid string) error
- func (r *RTC) SendAnswer(sdp webrtc.SessionDescription) error
- func (r *RTC) SendJoin(sid string, uid string) error
- func (r *RTC) SendTrickle(candidate *webrtc.ICECandidate, target Target) error
- func (r *RTC) SendTrickleInit(candidate webrtc.ICECandidateInit, target Target) error
- func (r *RTC) Subscribe(trackInfos []*Subscription) error
- func (r *RTC) Update(tracks []*pb.Subscription) error
- type Subscription
- type Target
- type UpPeerLocal
- func (p *UpPeerLocal) AddICECandidate(candidate webrtc.ICECandidateInit) error
- func (p *UpPeerLocal) Answer(desc webrtc.SessionDescription) (*webrtc.SessionDescription, error)
- func (p *UpPeerLocal) Close() error
- func (p *UpPeerLocal) GetStats() webrtc.StatsReport
- func (p *UpPeerLocal) Join(sid string) error
- func (p *UpPeerLocal) OnICECandidate(f func(c *webrtc.ICECandidateInit))
Constants ¶
This section is empty.
Variables ¶
View Source
var Layers = map[pb.Subscription_Layer]string{ pb.Subscription_Q: "q", pb.Subscription_H: "h", pb.Subscription_F: "f", }
Functions ¶
func TrackSame ¶
func TrackSame(t1 *pb.Subscription, t2 *webrtc.TrackRemote) bool
Types ¶
type RTC ¶
func NewRTC ¶
func NewRTC(peer UpPeerLocal, signaller rtc.RTC_SignalClient) *RTC
func (*RTC) SendAnswer ¶
func (*RTC) SendTrickle ¶
func (*RTC) SendTrickleInit ¶
func (*RTC) Subscribe ¶
func (r *RTC) Subscribe(trackInfos []*Subscription) error
Subscribe to tracks
type Subscription ¶
type UpPeerLocal ¶
type UpPeerLocal struct {
// contains filtered or unexported fields
}
UpPeerLocal is a local peer that only have up tracks (tracks from other nodes)
func NewUpPeerLocal ¶
func NewUpPeerLocal(peer *ion_sfu.PeerLocal) UpPeerLocal
func (*UpPeerLocal) AddICECandidate ¶
func (p *UpPeerLocal) AddICECandidate(candidate webrtc.ICECandidateInit) error
func (*UpPeerLocal) Answer ¶
func (p *UpPeerLocal) Answer(desc webrtc.SessionDescription) (*webrtc.SessionDescription, error)
func (*UpPeerLocal) Close ¶
func (p *UpPeerLocal) Close() error
func (*UpPeerLocal) GetStats ¶
func (p *UpPeerLocal) GetStats() webrtc.StatsReport
func (*UpPeerLocal) Join ¶
func (p *UpPeerLocal) Join(sid string) error
Join the up track peer join a session, with the option NoPublish = false and NoSubscribe = true
func (*UpPeerLocal) OnICECandidate ¶
func (p *UpPeerLocal) OnICECandidate(f func(c *webrtc.ICECandidateInit))
Click to show internal directories.
Click to hide internal directories.