Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RTCPeerConnection ¶
type RTCPeerConnection struct { Ontrack func(mediaType TrackType, buffers <-chan *rtp.Packet) LocalDescription *sdp.SessionDescription OnICEConnectionStateChange func(iceConnectionState ice.ConnectionState) // contains filtered or unexported fields }
RTCPeerConnection represents a WebRTC connection between itself and a remote peer
func (*RTCPeerConnection) AddTrack ¶
func (r *RTCPeerConnection) AddTrack(mediaType TrackType, clockRate uint32) (samples chan<- RTCSample, err error)
AddTrack adds a new track to the RTCPeerConnection This function returns a channel to push buffers on, and an error if the channel can't be added Closing the channel ends this stream
func (*RTCPeerConnection) Close ¶
func (r *RTCPeerConnection) Close() error
Close ends the RTCPeerConnection
func (*RTCPeerConnection) CreateOffer ¶
func (r *RTCPeerConnection) CreateOffer() error
CreateOffer starts the RTCPeerConnection and generates the localDescription The order of CreateOffer/SetRemoteDescription determines if we are the offerer or the answerer Once the RemoteDescription has been set network activity will start
func (*RTCPeerConnection) SetRemoteDescription ¶
func (r *RTCPeerConnection) SetRemoteDescription(rawSessionDescription string) error
SetRemoteDescription sets the SessionDescription of the remote peer
Click to show internal directories.
Click to hide internal directories.