Documentation ¶
Index ¶
- func NewWebSocketConn(host, token string, opts *Options) (*websocket.Conn, error)
- func SetAuthorizationToken(header http.Header, token string)
- type Options
- type RTCClient
- func (c *RTCClient) AddFileTrack(path string, id string, label string) (writer *TrackWriter, err error)
- func (c *RTCClient) AddStaticTrack(mime string, id string, label string) (writer *TrackWriter, err error)
- func (c *RTCClient) AddTrack(track *webrtc.TrackLocalStaticSample, path string) (writer *TrackWriter, err error)
- func (c *RTCClient) BytesReceived() uint64
- func (c *RTCClient) ID() string
- func (c *RTCClient) ReadResponse() (*livekit.SignalResponse, error)
- func (c *RTCClient) RemoteParticipants() []*livekit.ParticipantInfo
- func (c *RTCClient) Run() error
- func (c *RTCClient) SendAddTrack(cid string, name string, trackType livekit.TrackType) error
- func (c *RTCClient) SendIceCandidate(ic *webrtc.ICECandidate, target livekit.SignalTarget) error
- func (c *RTCClient) SendNacks(count int)
- func (c *RTCClient) SendRequest(msg *livekit.SignalRequest) error
- func (c *RTCClient) Stop()
- func (c *RTCClient) SubscribedTracks() map[string][]*webrtc.TrackRemote
- func (c *RTCClient) WaitUntilConnected() error
- type TrackWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWebSocketConn ¶
func SetAuthorizationToken ¶
Types ¶
type RTCClient ¶
type RTCClient struct { OnConnected func() // contains filtered or unexported fields }
func (*RTCClient) AddFileTrack ¶
func (*RTCClient) AddStaticTrack ¶
func (*RTCClient) AddTrack ¶
func (c *RTCClient) AddTrack(track *webrtc.TrackLocalStaticSample, path string) (writer *TrackWriter, err error)
func (*RTCClient) BytesReceived ¶
func (*RTCClient) ReadResponse ¶
func (c *RTCClient) ReadResponse() (*livekit.SignalResponse, error)
func (*RTCClient) RemoteParticipants ¶
func (c *RTCClient) RemoteParticipants() []*livekit.ParticipantInfo
func (*RTCClient) SendAddTrack ¶
send AddTrack command to server to initiate server-side negotiation
func (*RTCClient) SendIceCandidate ¶
func (c *RTCClient) SendIceCandidate(ic *webrtc.ICECandidate, target livekit.SignalTarget) error
func (*RTCClient) SendRequest ¶
func (c *RTCClient) SendRequest(msg *livekit.SignalRequest) error
func (*RTCClient) SubscribedTracks ¶
func (*RTCClient) WaitUntilConnected ¶
type TrackWriter ¶
type TrackWriter struct {
// contains filtered or unexported fields
}
Writes a file to an RTP track. makes it easier to debug and create RTP streams
func NewTrackWriter ¶
func NewTrackWriter(ctx context.Context, track *webrtc.TrackLocalStaticSample, filePath string) *TrackWriter
func (*TrackWriter) Start ¶
func (w *TrackWriter) Start() error
func (*TrackWriter) Stop ¶
func (w *TrackWriter) Stop()
Click to show internal directories.
Click to hide internal directories.