Documentation ¶
Overview ¶
Package whip contains a WHIP/WHEP client.
Index ¶
- func ICEFragmentMarshal(offer string, candidates []*webrtc.ICECandidateInit) ([]byte, error)
- func ICEFragmentUnmarshal(buf []byte) ([]*webrtc.ICECandidateInit, error)
- func LinkHeaderMarshal(iceServers []webrtc.ICEServer) []string
- func LinkHeaderUnmarshal(link []string) ([]webrtc.ICEServer, error)
- type Client
- func (c *Client) Close() error
- func (c *Client) PeerConnection() *webrtc.PeerConnection
- func (c *Client) Publish(ctx context.Context, outgoingTracks []*webrtc.OutgoingTrack) error
- func (c *Client) Read(ctx context.Context) ([]*webrtc.IncomingTrack, error)
- func (c *Client) StartReading()
- func (c *Client) Wait(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ICEFragmentMarshal ¶
ICEFragmentMarshal encodes an ICE fragment.
func ICEFragmentUnmarshal ¶
ICEFragmentUnmarshal decodes an ICE fragment.
func LinkHeaderMarshal ¶
func LinkHeaderMarshal(iceServers []webrtc.ICEServer) []string
LinkHeaderMarshal encodes a link header.
func LinkHeaderUnmarshal ¶
LinkHeaderUnmarshal decodes a link header.
Types ¶
type Client ¶
type Client struct { HTTPClient *http.Client URL *url.URL Log logger.Writer // contains filtered or unexported fields }
Client is a WHIP client.
func (*Client) PeerConnection ¶
func (c *Client) PeerConnection() *webrtc.PeerConnection
PeerConnection returns the underlying peer connection.
func (*Client) StartReading ¶
func (c *Client) StartReading()
StartReading starts reading all incoming tracks.
Click to show internal directories.
Click to hide internal directories.