Versions in this module Expand all Collapse all v2 v2.2.25 Aug 10, 2020 Changes in this version + const DefaultPayloadTypeG722 — darwin/amd64, linux/amd64, windows/amd64 + const DefaultPayloadTypeH264 — darwin/amd64, linux/amd64, windows/amd64 + const DefaultPayloadTypeOpus — darwin/amd64, linux/amd64, windows/amd64 + const DefaultPayloadTypePCMA — darwin/amd64, linux/amd64, windows/amd64 + const DefaultPayloadTypePCMU — darwin/amd64, linux/amd64, windows/amd64 + const DefaultPayloadTypeVP8 — darwin/amd64, linux/amd64, windows/amd64 + const DefaultPayloadTypeVP9 — darwin/amd64, linux/amd64, windows/amd64 + const G722 — darwin/amd64, linux/amd64, windows/amd64 + const H264 — darwin/amd64, linux/amd64, windows/amd64 + const ICETransportStateChecking + const ICETransportStateClosed + const ICETransportStateCompleted + const ICETransportStateConnected + const ICETransportStateDisconnected + const ICETransportStateFailed + const ICETransportStateNew + const Opus — darwin/amd64, linux/amd64, windows/amd64 + const PCMA — darwin/amd64, linux/amd64, windows/amd64 + const PCMU — darwin/amd64, linux/amd64, windows/amd64 + const TypeRTCPFBACK + const TypeRTCPFBCCM + const TypeRTCPFBGoogREMB + const TypeRTCPFBNACK + const TypeRTCPFBTransportCC + const Unknown + const VP8 — darwin/amd64, linux/amd64, windows/amd64 + const VP9 — darwin/amd64, linux/amd64, windows/amd64 + var ErrCertificateExpired = errors.New("x509Cert expired") + var ErrCodecNotFound = errors.New("codec not found") + var ErrConnectionClosed = errors.New("connection closed") + var ErrDataChannelNotOpen = errors.New("data channel not open") + var ErrExistingTrack = errors.New("track already exists") + var ErrIncorrectSDPSemantics = errors.New("offer SDP semantics does not match configuration") + var ErrMaxDataChannelID = errors.New("maximum number ID for datachannel specified") + var ErrModifyingBundlePolicy = errors.New("bundle policy cannot be modified") + var ErrModifyingCertificates = errors.New("certificates cannot be modified") + var ErrModifyingICECandidatePoolSize = errors.New("ice candidate pool size cannot be modified") + var ErrModifyingPeerIdentity = errors.New("peerIdentity cannot be modified") + var ErrModifyingRTCPMuxPolicy = errors.New("rtcp mux policy cannot be modified") + var ErrNegotiatedWithoutID = errors.New("negotiated set without channel id") + var ErrNoRemoteDescription = errors.New("remote description is not set") + var ErrNoTurnCredentials = errors.New("turn server credentials required") + var ErrPrivateKeyType = errors.New("private key type not supported") + var ErrProtocolTooLarge = errors.New("protocol is larger then 65535 bytes") + var ErrRetransmitsOrPacketLifeTime = errors.New("both MaxPacketLifeTime and MaxRetransmits was set") + var ErrSenderNotCreatedByConnection = errors.New("RtpSender not created by this PeerConnection") + var ErrSessionDescriptionConflictingFingerprints = errors.New("SetRemoteDescription called with multiple conflicting fingerprint") + var ErrSessionDescriptionConflictingIcePwd = errors.New("SetRemoteDescription called with multiple conflicting ice-pwd values") + var ErrSessionDescriptionConflictingIceUfrag = errors.New("SetRemoteDescription called with multiple conflicting ice-ufrag values") + var ErrSessionDescriptionInvalidFingerprint = errors.New("SetRemoteDescription called with an invalid fingerprint") + var ErrSessionDescriptionMissingIcePwd = errors.New("SetRemoteDescription called with no ice-pwd") + var ErrSessionDescriptionMissingIceUfrag = errors.New("SetRemoteDescription called with no ice-ufrag") + var ErrSessionDescriptionNoFingerprint = errors.New("SetRemoteDescription called with no fingerprint") + var ErrStringSizeLimit = errors.New("data channel label exceeds size limit") + var ErrTurnCredentials = errors.New("invalid turn server credentials") + var ErrUnknownType = errors.New("unknown") + func WithMediaEngine(m MediaEngine) func(a *API) — darwin/amd64, linux/amd64, windows/amd64 + func WithSettingEngine(s SettingEngine) func(a *API) + type API struct + func NewAPI(options ...func(*API)) *API + func (api *API) NewDTLSTransport(transport *ICETransport, certificates []Certificate) (*DTLSTransport, error) + func (api *API) NewDataChannel(transport *SCTPTransport, params *DataChannelParameters) (*DataChannel, error) + func (api *API) NewICEGatherer(opts ICEGatherOptions) (*ICEGatherer, error) + func (api *API) NewICETransport(gatherer *ICEGatherer) *ICETransport + func (api *API) NewPeerConnection(configuration Configuration) (*PeerConnection, error) + func (api *API) NewPeerConnection(configuration Configuration) (_ *PeerConnection, err error) + func (api *API) NewRTPReceiver(kind RTPCodecType, transport *DTLSTransport) (*RTPReceiver, error) + func (api *API) NewRTPSender(track *Track, transport *DTLSTransport) (*RTPSender, error) + func (api *API) NewSCTPTransport(dtls *DTLSTransport) *SCTPTransport + type AnswerOptions struct + type AudioReceiverStats struct + AudioLevel float64 + ConcealedSamples uint64 + ConcealmentEvents uint64 + EstimatedPlayoutTimestamp StatsTimestamp + ID string + JitterBufferDelay float64 + JitterBufferEmittedCount uint64 + Timestamp StatsTimestamp + TotalAudioEnergy float64 + TotalSamplesDuration float64 + TotalSamplesReceived uint64 + Type StatsType + VoiceActivityFlag bool + type AudioSenderStats struct + AudioLevel float64 + EchoReturnLoss float64 + EchoReturnLossEnhancement float64 + Ended bool + ID string + Kind string + RemoteSource bool + Timestamp StatsTimestamp + TotalAudioEnergy float64 + TotalSamplesDuration float64 + TotalSamplesSent uint64 + TrackIdentifier string + Type StatsType + VoiceActivityFlag bool + type BundlePolicy int + const BundlePolicyBalanced + const BundlePolicyMaxBundle + const BundlePolicyMaxCompat + func (t BundlePolicy) String() string + type Certificate struct — darwin/amd64, linux/amd64, windows/amd64 + func CertificateFromX509(privateKey crypto.PrivateKey, certificate *x509.Certificate) Certificate + func GenerateCertificate(secretKey crypto.PrivateKey) (*Certificate, error) + func NewCertificate(key crypto.PrivateKey, tpl x509.Certificate) (*Certificate, error) + func (c Certificate) Equals(o Certificate) bool + func (c Certificate) Expires() time.Time + func (c Certificate) GetFingerprints() ([]DTLSFingerprint, error) + type CertificateStats struct + Base64Certificate string + Fingerprint string + FingerprintAlgorithm string + ID string + IssuerCertificateID string + Timestamp StatsTimestamp + Type StatsType + type CodecStats struct + Channels uint32 + ClockRate uint32 + CodecType CodecType + ID string + Implementation string + MimeType string + PayloadType uint32 + SDPFmtpLine string + Timestamp StatsTimestamp + TransportID string + Type StatsType + type CodecType string + const CodecTypeDecode + const CodecTypeEncode + type Configuration struct + BundlePolicy BundlePolicy + Certificates []Certificate + ICECandidatePoolSize uint8 + ICEServers []ICEServer + ICETransportPolicy ICETransportPolicy + PeerIdentity string + RTCPMuxPolicy RTCPMuxPolicy + SDPSemantics SDPSemantics + type DTLSFingerprint struct + Algorithm string + Value string + type DTLSParameters struct + Fingerprints []DTLSFingerprint + Role DTLSRole + type DTLSRole byte + const DTLSRoleAuto + const DTLSRoleClient + const DTLSRoleServer + func (r DTLSRole) String() string + type DTLSTransport struct — darwin/amd64, linux/amd64, windows/amd64 + func (t *DTLSTransport) GetLocalParameters() (DTLSParameters, error) + func (t *DTLSTransport) GetRemoteCertificate() []byte + func (t *DTLSTransport) ICETransport() *ICETransport + func (t *DTLSTransport) OnStateChange(f func(DTLSTransportState)) + func (t *DTLSTransport) Start(remoteParameters DTLSParameters) error + func (t *DTLSTransport) State() DTLSTransportState + func (t *DTLSTransport) Stop() error + type DTLSTransportState int + const DTLSTransportStateClosed + const DTLSTransportStateConnected + const DTLSTransportStateConnecting + const DTLSTransportStateFailed + const DTLSTransportStateNew + func (t DTLSTransportState) String() string + type DataChannel struct + func (d *DataChannel) BufferedAmount() uint64 + func (d *DataChannel) BufferedAmountLowThreshold() uint64 + func (d *DataChannel) Close() (err error) + func (d *DataChannel) Close() error + func (d *DataChannel) Detach() (datachannel.ReadWriteCloser, error) + func (d *DataChannel) ID() *uint16 + func (d *DataChannel) Label() string + func (d *DataChannel) MaxPacketLifeTime() *uint16 + func (d *DataChannel) MaxRetransmits() *uint16 + func (d *DataChannel) Negotiated() bool + func (d *DataChannel) OnBufferedAmountLow(f func()) + func (d *DataChannel) OnClose(f func()) + func (d *DataChannel) OnError(f func(err error)) + func (d *DataChannel) OnMessage(f func(msg DataChannelMessage)) + func (d *DataChannel) OnOpen(f func()) + func (d *DataChannel) Ordered() bool + func (d *DataChannel) Protocol() string + func (d *DataChannel) ReadyState() DataChannelState + func (d *DataChannel) Send(data []byte) (err error) + func (d *DataChannel) Send(data []byte) error + func (d *DataChannel) SendText(s string) (err error) + func (d *DataChannel) SendText(s string) error + func (d *DataChannel) SetBufferedAmountLowThreshold(th uint64) + func (d *DataChannel) Transport() *SCTPTransport + type DataChannelInit struct + ID *uint16 + MaxPacketLifeTime *uint16 + MaxRetransmits *uint16 + Negotiated *bool + Ordered *bool + Protocol *string + type DataChannelMessage struct + Data []byte + IsString bool + type DataChannelParameters struct + ID *uint16 + Label string + MaxPacketLifeTime *uint16 + MaxRetransmits *uint16 + Negotiated bool + Ordered bool + Protocol string + type DataChannelState int + const DataChannelStateClosed + const DataChannelStateClosing + const DataChannelStateConnecting + const DataChannelStateOpen + func (t DataChannelState) String() string + type DataChannelStats struct + BytesReceived uint64 + BytesSent uint64 + DataChannelIdentifier int32 + ID string + Label string + MessagesReceived uint32 + MessagesSent uint32 + Protocol string + State DataChannelState + Timestamp StatsTimestamp + TransportID string + Type StatsType + type ICECandidate struct + Address string + Component uint16 + Foundation string + Port uint16 + Priority uint32 + Protocol ICEProtocol + RelatedAddress string + RelatedPort uint16 + Typ ICECandidateType + func (c ICECandidate) String() string + func (c ICECandidate) ToJSON() ICECandidateInit + type ICECandidateInit struct + Candidate string + SDPMLineIndex *uint16 + SDPMid *string + UsernameFragment string + type ICECandidatePair struct + Local *ICECandidate + Remote *ICECandidate + func NewICECandidatePair(local, remote *ICECandidate) *ICECandidatePair + func (p *ICECandidatePair) String() string + type ICECandidatePairStats struct + AvailableIncomingBitrate float64 + AvailableOutgoingBitrate float64 + BytesReceived uint64 + BytesSent uint64 + CircuitBreakerTriggerCount uint32 + ConsentExpiredTimestamp StatsTimestamp + ConsentRequestsSent uint64 + CurrentRoundTripTime float64 + FirstRequestTimestamp StatsTimestamp + ID string + LastPacketReceivedTimestamp StatsTimestamp + LastPacketSentTimestamp StatsTimestamp + LastRequestTimestamp StatsTimestamp + LastResponseTimestamp StatsTimestamp + LocalCandidateID string + Nominated bool + PacketsReceived uint32 + PacketsSent uint32 + RemoteCandidateID string + RequestsReceived uint64 + RequestsSent uint64 + ResponsesReceived uint64 + ResponsesSent uint64 + RetransmissionsReceived uint64 + RetransmissionsSent uint64 + State StatsICECandidatePairState + Timestamp StatsTimestamp + TotalRoundTripTime float64 + TransportID string + Type StatsType + type ICECandidateStats struct + CandidateType ICECandidateType + Deleted bool + ID string + IP string + NetworkType NetworkType + Port int32 + Priority int32 + Protocol string + RelayProtocol string + Timestamp StatsTimestamp + TransportID string + Type StatsType + URL string + type ICECandidateType int + const ICECandidateTypeHost + const ICECandidateTypePrflx + const ICECandidateTypeRelay + const ICECandidateTypeSrflx + func NewICECandidateType(raw string) (ICECandidateType, error) + func (t ICECandidateType) String() string + type ICEComponent int + const ICEComponentRTCP + const ICEComponentRTP + func (t ICEComponent) String() string + type ICEConnectionState int + const ICEConnectionStateChecking + const ICEConnectionStateClosed + const ICEConnectionStateCompleted + const ICEConnectionStateConnected + const ICEConnectionStateDisconnected + const ICEConnectionStateFailed + const ICEConnectionStateNew + func NewICEConnectionState(raw string) ICEConnectionState + func (c ICEConnectionState) String() string + type ICECredentialType int + const ICECredentialTypeOauth + const ICECredentialTypePassword + func (t ICECredentialType) String() string + type ICEGatherOptions struct + ICEGatherPolicy ICETransportPolicy + ICEServers []ICEServer + type ICEGatherPolicy = ICETransportPolicy + type ICEGatherer struct — darwin/amd64, linux/amd64, windows/amd64 + func (g *ICEGatherer) Close() error + func (g *ICEGatherer) Gather() error + func (g *ICEGatherer) GetLocalCandidates() ([]ICECandidate, error) + func (g *ICEGatherer) GetLocalParameters() (ICEParameters, error) + func (g *ICEGatherer) OnLocalCandidate(f func(*ICECandidate)) + func (g *ICEGatherer) OnStateChange(f func(ICEGathererState)) + func (g *ICEGatherer) SignalCandidates() error + func (g *ICEGatherer) State() ICEGathererState + type ICEGathererState uint32 + const ICEGathererStateClosed + const ICEGathererStateComplete + const ICEGathererStateGathering + const ICEGathererStateNew + func (s ICEGathererState) String() string + type ICEGatheringState int + const ICEGatheringStateComplete + const ICEGatheringStateGathering + const ICEGatheringStateNew + func NewICEGatheringState(raw string) ICEGatheringState + func (t ICEGatheringState) String() string + type ICEParameters struct + ICELite bool + Password string + UsernameFragment string + type ICEProtocol int + const ICEProtocolTCP + const ICEProtocolUDP + func NewICEProtocol(raw string) (ICEProtocol, error) + func (t ICEProtocol) String() string + type ICERole int + const ICERoleControlled + const ICERoleControlling + func (t ICERole) String() string + type ICEServer struct + Credential interface{} + CredentialType ICECredentialType + URLs []string + Username string + type ICETransport struct — darwin/amd64, linux/amd64, windows/amd64 + func NewICETransport(gatherer *ICEGatherer, loggerFactory logging.LoggerFactory) *ICETransport + func (t *ICETransport) AddRemoteCandidate(remoteCandidate ICECandidate) error + func (t *ICETransport) NewEndpoint(f mux.MatchFunc) *mux.Endpoint + func (t *ICETransport) OnConnectionStateChange(f func(ICETransportState)) + func (t *ICETransport) OnSelectedCandidatePairChange(f func(*ICECandidatePair)) + func (t *ICETransport) Role() ICERole + func (t *ICETransport) SetRemoteCandidates(remoteCandidates []ICECandidate) error + func (t *ICETransport) Start(gatherer *ICEGatherer, params ICEParameters, role *ICERole) error + func (t *ICETransport) State() ICETransportState + func (t *ICETransport) Stop() error + type ICETransportPolicy int + const ICETransportPolicyAll + const ICETransportPolicyRelay + func NewICETransportPolicy(raw string) ICETransportPolicy + func (t ICETransportPolicy) String() string + type ICETransportState int + func (c ICETransportState) String() string + type InboundRTPStreamStats struct + AverageRTCPInterval float64 + BurstDiscardCount uint32 + BurstDiscardRate float64 + BurstLossCount uint32 + BurstLossRate float64 + BurstPacketsDiscarded uint32 + BurstPacketsLost uint32 + BytesReceived uint64 + CodecID string + FECPacketsReceived uint32 + FIRCount uint32 + FramesDecoded uint32 + GapDiscardRate float64 + GapLossRate float64 + ID string + Jitter float64 + Kind string + LastPacketReceivedTimestamp StatsTimestamp + NACKCount uint32 + PLICount uint32 + PacketsDiscarded uint32 + PacketsDuplicated uint32 + PacketsFailedDecryption uint32 + PacketsLost int32 + PacketsReceived uint32 + PacketsRepaired uint32 + PerDSCPPacketsReceived map[string]uint32 + QPSum uint64 + ReceiverID string + RemoteID string + SLICount uint32 + SSRC uint32 + Timestamp StatsTimestamp + TrackID string + TransportID string + Type StatsType + type MediaEngine struct — darwin/amd64, linux/amd64, windows/amd64 + func (m *MediaEngine) GetCodecsByKind(kind RTPCodecType) []*RTPCodec + func (m *MediaEngine) GetCodecsByName(codecName string) []*RTPCodec + func (m *MediaEngine) PopulateFromSDP(sd SessionDescription) error + func (m *MediaEngine) RegisterCodec(codec *RTPCodec) uint8 + func (m *MediaEngine) RegisterDefaultCodecs() + type MediaStreamStats struct + ID string + StreamIdentifier string + Timestamp StatsTimestamp + TrackIDs []string + Type StatsType + type NetworkType int + const NetworkTypeTCP4 + const NetworkTypeTCP6 + const NetworkTypeUDP4 + const NetworkTypeUDP6 + func NewNetworkType(raw string) (NetworkType, error) + func (t NetworkType) Protocol() string + func (t NetworkType) String() string + type OAuthCredential struct + AccessToken string + MACKey string + type OfferAnswerOptions struct + VoiceActivityDetection bool + type OfferOptions struct + ICERestart bool + type OutboundRTPStreamStats struct + AverageRTCPInterval float64 + BytesDiscardedOnSend uint64 + BytesSent uint64 + CodecID string + FECPacketsSent uint32 + FIRCount uint32 + FramesEncoded uint32 + ID string + Kind string + LastPacketSentTimestamp StatsTimestamp + NACKCount uint32 + PLICount uint32 + PacketsDiscardedOnSend uint32 + PacketsSent uint32 + PerDSCPPacketsSent map[string]uint32 + QPSum uint64 + QualityLimitationDurations map[string]float64 + QualityLimitationReason QualityLimitationReason + RemoteID string + SLICount uint32 + SSRC uint32 + SenderID string + TargetBitrate float64 + Timestamp StatsTimestamp + TotalEncodeTime float64 + TrackID string + TransportID string + Type StatsType + type PeerConnection struct + LastOffer string + func NewPeerConnection(configuration Configuration) (*PeerConnection, error) + func (pc *PeerConnection) AddICECandidate(candidate ICECandidateInit) (err error) + func (pc *PeerConnection) AddICECandidate(candidate ICECandidateInit) error + func (pc *PeerConnection) AddTrack(track *Track) (*RTPSender, error) + func (pc *PeerConnection) AddTransceiver(trackOrKind RTPCodecType, init ...RtpTransceiverInit) (*RTPTransceiver, error) + func (pc *PeerConnection) AddTransceiverFromKind(kind RTPCodecType, init ...RtpTransceiverInit) (*RTPTransceiver, error) + func (pc *PeerConnection) AddTransceiverFromTrack(track *Track, init ...RtpTransceiverInit) (*RTPTransceiver, error) + func (pc *PeerConnection) Close() (err error) + func (pc *PeerConnection) Close() error + func (pc *PeerConnection) ConnectionState() PeerConnectionState + func (pc *PeerConnection) CreateAnswer(options *AnswerOptions) (SessionDescription, error) + func (pc *PeerConnection) CreateAnswer(options *AnswerOptions) (_ SessionDescription, err error) + func (pc *PeerConnection) CreateDataChannel(label string, options *DataChannelInit) (*DataChannel, error) + func (pc *PeerConnection) CreateDataChannel(label string, options *DataChannelInit) (_ *DataChannel, err error) + func (pc *PeerConnection) CreateOffer(options *OfferOptions) (SessionDescription, error) + func (pc *PeerConnection) CreateOffer(options *OfferOptions) (_ SessionDescription, err error) + func (pc *PeerConnection) CurrentLocalDescription() *SessionDescription + func (pc *PeerConnection) CurrentRemoteDescription() *SessionDescription + func (pc *PeerConnection) GetConfiguration() Configuration + func (pc *PeerConnection) GetReceivers() []*RTPReceiver + func (pc *PeerConnection) GetRegisteredRTPCodecs(kind RTPCodecType) []*RTPCodec + func (pc *PeerConnection) GetSenders() []*RTPSender + func (pc *PeerConnection) GetStats() StatsReport + func (pc *PeerConnection) GetTransceivers() []*RTPTransceiver + func (pc *PeerConnection) ICEConnectionState() ICEConnectionState + func (pc *PeerConnection) ICEGatheringState() ICEGatheringState + func (pc *PeerConnection) JSValue() js.Value + func (pc *PeerConnection) LocalDescription() *SessionDescription + func (pc *PeerConnection) NewTrack(payloadType uint8, ssrc uint32, id, label string) (*Track, error) + func (pc *PeerConnection) OnConnectionStateChange(f func(PeerConnectionState)) + func (pc *PeerConnection) OnDataChannel(f func(*DataChannel)) + func (pc *PeerConnection) OnICECandidate(f func(*ICECandidate)) + func (pc *PeerConnection) OnICECandidate(f func(candidate *ICECandidate)) + func (pc *PeerConnection) OnICEConnectionStateChange(f func(ICEConnectionState)) + func (pc *PeerConnection) OnICEGatheringStateChange(f func()) + func (pc *PeerConnection) OnICEGatheringStateChange(f func(ICEGathererState)) + func (pc *PeerConnection) OnSignalingStateChange(f func(SignalingState)) + func (pc *PeerConnection) OnTrack(f func(*Track, *RTPReceiver)) + func (pc *PeerConnection) PendingLocalDescription() *SessionDescription + func (pc *PeerConnection) PendingRemoteDescription() *SessionDescription + func (pc *PeerConnection) RemoteDescription() *SessionDescription + func (pc *PeerConnection) RemoveTrack(sender *RTPSender) error + func (pc *PeerConnection) SetConfiguration(configuration Configuration) (err error) + func (pc *PeerConnection) SetConfiguration(configuration Configuration) error + func (pc *PeerConnection) SetIdentityProvider(provider string) (err error) + func (pc *PeerConnection) SetIdentityProvider(provider string) error + func (pc *PeerConnection) SetLocalDescription(desc SessionDescription) (err error) + func (pc *PeerConnection) SetLocalDescription(desc SessionDescription) error + func (pc *PeerConnection) SetRemoteDescription(desc SessionDescription) (err error) + func (pc *PeerConnection) SetRemoteDescription(desc SessionDescription) error + func (pc *PeerConnection) SignalingState() SignalingState + func (pc *PeerConnection) WriteRTCP(pkts []rtcp.Packet) error + type PeerConnectionState int + const PeerConnectionStateClosed + const PeerConnectionStateConnected + const PeerConnectionStateConnecting + const PeerConnectionStateDisconnected + const PeerConnectionStateFailed + const PeerConnectionStateNew + func (t PeerConnectionState) String() string + type PeerConnectionStats struct + DataChannelsAccepted uint32 + DataChannelsClosed uint32 + DataChannelsOpened uint32 + DataChannelsRequested uint32 + ID string + Timestamp StatsTimestamp + Type StatsType + type QualityLimitationReason string + const QualityLimitationReasonBandwidth + const QualityLimitationReasonCPU + const QualityLimitationReasonNone + const QualityLimitationReasonOther + type RTCPFeedback struct + Parameter string + Type string + type RTCPMuxPolicy int + const RTCPMuxPolicyNegotiate + const RTCPMuxPolicyRequire + func (t RTCPMuxPolicy) String() string + type RTPCapabilities struct — darwin/amd64, linux/amd64, windows/amd64 + Codecs []RTPCodecCapability + HeaderExtensions []RTPHeaderExtensionCapability + type RTPCodec struct — darwin/amd64, linux/amd64, windows/amd64 + Name string + PayloadType uint8 + Payloader rtp.Payloader + Type RTPCodecType + func NewRTPCodec(codecType RTPCodecType, name string, clockrate uint32, channels uint16, ...) *RTPCodec + func NewRTPCodecExt(codecType RTPCodecType, name string, clockrate uint32, channels uint16, ...) *RTPCodec + func NewRTPG722Codec(payloadType uint8, clockrate uint32) *RTPCodec + func NewRTPH264Codec(payloadType uint8, clockrate uint32) *RTPCodec + func NewRTPH264CodecExt(payloadType uint8, clockrate uint32, rtcpfb []RTCPFeedback, fmtp string) *RTPCodec + func NewRTPOpusCodec(payloadType uint8, clockrate uint32) *RTPCodec + func NewRTPPCMACodec(payloadType uint8, clockrate uint32) *RTPCodec + func NewRTPPCMUCodec(payloadType uint8, clockrate uint32) *RTPCodec + func NewRTPVP8Codec(payloadType uint8, clockrate uint32) *RTPCodec + func NewRTPVP8CodecExt(payloadType uint8, clockrate uint32, rtcpfb []RTCPFeedback, fmtp string) *RTPCodec + func NewRTPVP9Codec(payloadType uint8, clockrate uint32) *RTPCodec + func NewRTPVP9CodecExt(payloadType uint8, clockrate uint32, rtcpfb []RTCPFeedback, fmtp string) *RTPCodec + type RTPCodecCapability struct — darwin/amd64, linux/amd64, windows/amd64 + Channels uint16 + ClockRate uint32 + MimeType string + RTCPFeedback []RTCPFeedback + SDPFmtpLine string + type RTPCodecType int — darwin/amd64, linux/amd64, windows/amd64 + const RTPCodecTypeAudio + const RTPCodecTypeVideo + func NewRTPCodecType(r string) RTPCodecType + func (t RTPCodecType) String() string + type RTPCodingParameters struct + PayloadType uint8 + SSRC uint32 + type RTPContributingSourceStats struct + AudioLevel float64 + ContributorSSRC uint32 + ID string + InboundRTPStreamID string + PacketsContributedTo uint32 + Timestamp StatsTimestamp + Type StatsType + type RTPDecodingParameters struct + type RTPEncodingParameters struct + type RTPHeaderExtensionCapability struct — darwin/amd64, linux/amd64, windows/amd64 + URI string + type RTPReceiveParameters struct + Encodings RTPDecodingParameters + type RTPReceiver struct — darwin/amd64, linux/amd64, windows/amd64 + func (r *RTPReceiver) Read(b []byte) (n int, err error) + func (r *RTPReceiver) ReadRTCP() ([]rtcp.Packet, error) + func (r *RTPReceiver) Receive(parameters RTPReceiveParameters) error + func (r *RTPReceiver) Stop() error + func (r *RTPReceiver) Track() *Track + func (r *RTPReceiver) Transport() *DTLSTransport + type RTPSendParameters struct + Encodings RTPEncodingParameters + type RTPSender struct — darwin/amd64, linux/amd64, windows/amd64 + func (r *RTPSender) Read(b []byte) (n int, err error) + func (r *RTPSender) ReadRTCP() ([]rtcp.Packet, error) + func (r *RTPSender) Send(parameters RTPSendParameters) error + func (r *RTPSender) SendRTP(header *rtp.Header, payload []byte) (int, error) + func (r *RTPSender) Stop() error + func (r *RTPSender) Track() *Track + func (r *RTPSender) Transport() *DTLSTransport + type RTPTransceiver struct — darwin/amd64, linux/amd64, windows/amd64 + func (t *RTPTransceiver) Direction() RTPTransceiverDirection + func (t *RTPTransceiver) Kind() RTPCodecType + func (t *RTPTransceiver) Mid() string + func (t *RTPTransceiver) Receiver() *RTPReceiver + func (t *RTPTransceiver) Sender() *RTPSender + func (t *RTPTransceiver) Stop() error + type RTPTransceiverDirection int + const RTPTransceiverDirectionInactive + const RTPTransceiverDirectionRecvonly + const RTPTransceiverDirectionSendonly + const RTPTransceiverDirectionSendrecv + func NewRTPTransceiverDirection(raw string) RTPTransceiverDirection + func (t RTPTransceiverDirection) String() string + type RemoteInboundRTPStreamStats struct + BurstDiscardCount uint32 + BurstDiscardRate float64 + BurstLossCount uint32 + BurstLossRate float64 + BurstPacketsDiscarded uint32 + BurstPacketsLost uint32 + CodecID string + FIRCount uint32 + FractionLost float64 + GapDiscardRate float64 + GapLossRate float64 + ID string + Jitter float64 + Kind string + LocalID string + NACKCount uint32 + PLICount uint32 + PacketsDiscarded uint32 + PacketsLost int32 + PacketsReceived uint32 + PacketsRepaired uint32 + QPSum uint64 + RoundTripTime float64 + SLICount uint32 + SSRC uint32 + Timestamp StatsTimestamp + TransportID string + Type StatsType + type RemoteOutboundRTPStreamStats struct + BytesDiscardedOnSend uint64 + BytesSent uint64 + CodecID string + FECPacketsSent uint32 + FIRCount uint32 + ID string + Kind string + LocalID string + NACKCount uint32 + PLICount uint32 + PacketsDiscardedOnSend uint32 + PacketsSent uint32 + QPSum uint64 + RemoteTimestamp StatsTimestamp + SLICount uint32 + SSRC uint32 + Timestamp StatsTimestamp + TransportID string + Type StatsType + type RtpTransceiverInit struct + Direction RTPTransceiverDirection + SendEncodings []RTPEncodingParameters + type SCTPCapabilities struct + MaxMessageSize uint32 + type SCTPTransport struct — darwin/amd64, linux/amd64, windows/amd64 + func (r *SCTPTransport) GetCapabilities() SCTPCapabilities + func (r *SCTPTransport) MaxChannels() uint16 + func (r *SCTPTransport) OnDataChannel(f func(*DataChannel)) + func (r *SCTPTransport) OnDataChannelOpened(f func(*DataChannel)) + func (r *SCTPTransport) OnError(f func(err error)) + func (r *SCTPTransport) Start(remoteCaps SCTPCapabilities) error + func (r *SCTPTransport) State() SCTPTransportState + func (r *SCTPTransport) Stop() error + func (r *SCTPTransport) Transport() *DTLSTransport + type SCTPTransportState int + const SCTPTransportStateClosed + const SCTPTransportStateConnected + const SCTPTransportStateConnecting + func (s SCTPTransportState) String() string + type SDPSemantics int + const SDPSemanticsPlanB + const SDPSemanticsUnifiedPlan + const SDPSemanticsUnifiedPlanWithFallback + func (s SDPSemantics) String() string + type SDPType int + const SDPTypeAnswer + const SDPTypeOffer + const SDPTypePranswer + const SDPTypeRollback + func (t *SDPType) UnmarshalJSON(b []byte) error + func (t SDPType) MarshalJSON() ([]byte, error) + func (t SDPType) String() string + type SenderAudioTrackAttachmentStats AudioSenderStats + type SenderVideoTrackAttachmentStats VideoSenderStats + type SessionDescription struct + SDP string + Type SDPType + type SettingEngine struct + LoggerFactory logging.LoggerFactory + func (e *SettingEngine) DetachDataChannels() + func (e *SettingEngine) DisableCertificateFingerprintVerification(isDisabled bool) + func (e *SettingEngine) DisableSRTCPReplayProtection(isDisabled bool) + func (e *SettingEngine) DisableSRTPReplayProtection(isDisabled bool) + func (e *SettingEngine) GenerateMulticastDNSCandidates(generateMulticastDNSCandidates bool) + func (e *SettingEngine) SetAnsweringDTLSRole(role DTLSRole) error + func (e *SettingEngine) SetCandidateSelectionTimeout(t time.Duration) + func (e *SettingEngine) SetConnectionTimeout(connectionTimeout, keepAlive time.Duration) + func (e *SettingEngine) SetDTLSReplayProtectionWindow(n uint) + func (e *SettingEngine) SetEphemeralUDPPortRange(portMin, portMax uint16) error + func (e *SettingEngine) SetHostAcceptanceMinWait(t time.Duration) + func (e *SettingEngine) SetICECredentials(usernameFragment, password string) + func (e *SettingEngine) SetInterfaceFilter(filter func(string) bool) + func (e *SettingEngine) SetLite(lite bool) + func (e *SettingEngine) SetMulticastDNSHostName(hostName string) + func (e *SettingEngine) SetNAT1To1IPs(ips []string, candidateType ICECandidateType) + func (e *SettingEngine) SetNetworkTypes(candidateTypes []NetworkType) + func (e *SettingEngine) SetPrflxAcceptanceMinWait(t time.Duration) + func (e *SettingEngine) SetRelayAcceptanceMinWait(t time.Duration) + func (e *SettingEngine) SetSRTCPReplayProtectionWindow(n uint) + func (e *SettingEngine) SetSRTPReplayProtectionWindow(n uint) + func (e *SettingEngine) SetSrflxAcceptanceMinWait(t time.Duration) + func (e *SettingEngine) SetTrickle(trickle bool) + func (e *SettingEngine) SetVNet(vnet *vnet.Net) + type SignalingState int + const SignalingStateClosed + const SignalingStateHaveLocalOffer + const SignalingStateHaveLocalPranswer + const SignalingStateHaveRemoteOffer + const SignalingStateHaveRemotePranswer + const SignalingStateStable + func (t SignalingState) String() string + type Stats interface + type StatsICECandidatePairState string + const StatsICECandidatePairStateFailed + const StatsICECandidatePairStateFrozen + const StatsICECandidatePairStateInProgress + const StatsICECandidatePairStateSucceeded + const StatsICECandidatePairStateWaiting + type StatsReport map[string]Stats + func (r StatsReport) GetConnectionStats(conn *PeerConnection) (PeerConnectionStats, bool) + func (r StatsReport) GetDataChannelStats(dc *DataChannel) (DataChannelStats, bool) + func (r StatsReport) GetICECandidatePairStats(c *ICECandidatePair) (ICECandidatePairStats, bool) + func (r StatsReport) GetICECandidateStats(c *ICECandidate) (ICECandidateStats, bool) + type StatsTimestamp float64 + func (s StatsTimestamp) Time() time.Time + type StatsType string + const StatsTypeCSRC + const StatsTypeCandidatePair + const StatsTypeCertificate + const StatsTypeCodec + const StatsTypeDataChannel + const StatsTypeInboundRTP + const StatsTypeLocalCandidate + const StatsTypeOutboundRTP + const StatsTypePeerConnection + const StatsTypeReceiver + const StatsTypeRemoteCandidate + const StatsTypeRemoteInboundRTP + const StatsTypeRemoteOutboundRTP + const StatsTypeSender + const StatsTypeStream + const StatsTypeTrack + const StatsTypeTransport + type Track struct — darwin/amd64, linux/amd64, windows/amd64 + func NewTrack(payloadType uint8, ssrc uint32, id, label string, codec *RTPCodec) (*Track, error) + func (t *Track) Codec() *RTPCodec + func (t *Track) ID() string + func (t *Track) Kind() RTPCodecType + func (t *Track) Label() string + func (t *Track) Packetizer() rtp.Packetizer + func (t *Track) PayloadType() uint8 + func (t *Track) Read(b []byte) (n int, err error) + func (t *Track) ReadRTP() (*rtp.Packet, error) + func (t *Track) SSRC() uint32 + func (t *Track) Write(b []byte) (n int, err error) + func (t *Track) WriteRTP(p *rtp.Packet) error + func (t *Track) WriteSample(s media.Sample) error + type TransportStats struct + BytesReceived uint64 + BytesSent uint64 + DTLSCipher string + DTLSState DTLSTransportState + ICERole ICERole + ID string + LocalCertificateID string + PacketsReceived uint32 + PacketsSent uint32 + RTCPTransportStatsID string + RemoteCertificateID string + SRTPCipher string + SelectedCandidatePairID string + Timestamp StatsTimestamp + Type StatsType + type VideoReceiverStats struct + EstimatedPlayoutTimestamp StatsTimestamp + FrameHeight uint32 + FrameWidth uint32 + FramesDecoded uint32 + FramesDropped uint32 + FramesPerSecond float64 + FramesReceived uint32 + FullFramesLost uint32 + ID string + JitterBufferDelay float64 + JitterBufferEmittedCount uint64 + KeyFramesReceived uint32 + PartialFramesLost uint32 + Timestamp StatsTimestamp + Type StatsType + type VideoSenderStats struct + FramesCaptured uint32 + FramesSent uint32 + HugeFramesSent uint32 + ID string + KeyFramesSent uint32 + Timestamp StatsTimestamp + Type StatsType Other modules containing this package github.com/heypinch/webrtc