Documentation
¶
Index ¶
- func StartPionPublisher(l *log.Logger, clientIP string, initialBitrateBps int, ...) (*webrtc.PeerConnection, *webrtc.TrackLocalStaticRTP, func() int, string, error)
- func StartPionSubscriber(l *log.Logger, clientIP string, janusOfferSDP string, ...) (*webrtc.PeerConnection, string, error)
- func StartSimplePublisher(l *log.Logger, clientIP string, impairment *pionutil.ImpairmentBinding) (*webrtc.PeerConnection, *webrtc.TrackLocalStaticSample, string, error)
- type Client
- func (c *Client) AttachPlugin(sessionID int64, plugin string) (int64, error)
- func (c *Client) CreateSession() (int64, error)
- func (c *Client) GetInfo() (map[string]any, error)
- func (c *Client) Keepalive(sessionID int64) error
- func (c *Client) LongPoll(ctx context.Context, sessionID int64) ([]*JanusMsg, error)
- func (c *Client) SendMessage(sessionID, handleID int64, body map[string]any, jsep *JSEP, txn string) (*JanusMsg, error)
- type JSEP
- type JanusError
- type JanusMsg
- type PluginData
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartPionPublisher ¶
func StartPionPublisher( l *log.Logger, clientIP string, initialBitrateBps int, impairment *pionutil.ImpairmentBinding, ) (*webrtc.PeerConnection, *webrtc.TrackLocalStaticRTP, func() int, string, error)
StartPionPublisher creates a PeerConnection in sendonly mode with GCC bandwidth estimation. Returns the PC, the RTP track, a function to get the current bandwidth estimate, and the offer SDP.
func StartPionSubscriber ¶
func StartPionSubscriber( l *log.Logger, clientIP string, janusOfferSDP string, impairment *pionutil.ImpairmentBinding, ) (*webrtc.PeerConnection, string, error)
StartPionSubscriber creates a PeerConnection in recvonly mode, sets the Janus offer as the remote description, and returns the PC and answer SDP. The caller is responsible for setting pc.OnTrack before media flows.
func StartSimplePublisher ¶
func StartSimplePublisher(l *log.Logger, clientIP string, impairment *pionutil.ImpairmentBinding) ( *webrtc.PeerConnection, *webrtc.TrackLocalStaticSample, string, error, )
StartSimplePublisher creates a sendonly PeerConnection without SVC or GCC.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AttachPlugin ¶
func (*Client) CreateSession ¶
type JanusError ¶
type JanusMsg ¶
type JanusMsg struct {
Janus string `json:"janus"`
Transaction string `json:"transaction"`
PluginData *PluginData `json:"plugindata,omitempty"`
JSEP *JSEP `json:"jsep,omitempty"`
Data map[string]any `json:"data,omitempty"`
Error *JanusError `json:"error,omitempty"`
Sender int64 `json:"sender,omitempty"`
SessionID int64 `json:"session_id,omitempty"`
}
type PluginData ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session manages one Janus HTTP session: runs an event-poll loop and dispatches events to pending transactions.
func NewSession ¶
Click to show internal directories.
Click to hide internal directories.