Categorygithub.com/pion/webrtc/v4
modulepackage
4.0.11
Repository: https://github.com/pion/webrtc.git
Documentation: pkg.go.dev

# README

Pion WebRTC
Pion WebRTC

A pure Go implementation of the WebRTC API

Pion WebRTC Sourcegraph Widget Slack Widget Twitter Widget
GitHub Workflow Status Go Reference Coverage Status Go Report Card License: MIT


New Release

Pion WebRTC v4.0.0 has been released! See the release notes to learn about new features and breaking changes.

If you aren't able to upgrade yet check the tags for the latest v3 release.

We would love your feedback! Please create GitHub issues or join the Slack channel to follow development and speak with the maintainers.


Usage

Go Modules are mandatory for using Pion WebRTC. So make sure you set export GO111MODULE=on, and explicitly specify /v4 (or an earlier version) when importing.

example applications contains code samples of common things people build with Pion WebRTC.

example-webrtc-applications contains more full featured examples that use 3rd party libraries.

awesome-pion contains projects that have used Pion, and serve as real world examples of usage.

GoDoc is an auto generated API reference. All our Public APIs are commented.

FAQ has answers to common questions. If you have a question not covered please ask in Slack we are always looking to expand it.

Now go build something awesome! Here are some ideas to get your creative juices flowing:

  • Send a video file to multiple browser in real time for perfectly synchronized movie watching.
  • Send a webcam on an embedded device to your browser with no additional server required!
  • Securely send data between two servers, without using pub/sub.
  • Record your webcam and do special effects server side.
  • Build a conferencing application that processes audio/video and make decisions off of it.
  • Remotely control a robots and stream its cameras in realtime.

Need Help?

Check out WebRTC for the Curious. A book about WebRTC in depth, not just about the APIs. Learn the full details of ICE, SCTP, DTLS, SRTP, and how they work together to make up the WebRTC stack. This is also a great resource if you are trying to debug. Learn the tools of the trade and how to approach WebRTC issues. This book is vendor agnostic and will not have any Pion specific information.

Pion has an active community on Slack. Please ask for help about anything, questions don't have to be Pion specific! Come share your interesting project you are working on. We are here to support you.

One of the maintainers of Pion Sean-Der is available to help. Schedule at siobud.com/meeting He is available to talk about Pion or general WebRTC questions, feel free to reach out about anything!

Features

PeerConnection API

  • Go implementation of webrtc-pc and webrtc-stats
  • DataChannels
  • Send/Receive audio and video
  • Renegotiation
  • Plan-B and Unified Plan
  • SettingEngine for Pion specific extensions

Connectivity

  • Full ICE Agent
  • ICE Restart
  • Trickle ICE
  • STUN
  • TURN (UDP, TCP, DTLS and TLS)
  • mDNS candidates

DataChannels

  • Ordered/Unordered
  • Lossy/Lossless

Media

Security

  • TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA for DTLS v1.2
  • SRTP_AEAD_AES_256_GCM and SRTP_AES128_CM_HMAC_SHA1_80 for SRTP
  • Hardware acceleration available for GCM suites

Pure Go

  • No Cgo usage
  • Wide platform support
    • Windows, macOS, Linux, FreeBSD
    • iOS, Android
    • WASM see examples
    • 386, amd64, arm, mips, ppc64
  • Easy to build Numbers generated on Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
    • Time to build examples/play-from-disk - 0.66s user 0.20s system 306% cpu 0.279 total
    • Time to run entire test suite - 25.60s user 9.40s system 45% cpu 1:16.69 total
  • Tools to measure performance provided

Roadmap

The library is in active development, please refer to the roadmap to track our major milestones. We also maintain a list of Big Ideas these are things we want to build but don't have a clear plan or the resources yet. If you are looking to get involved this is a great place to get started! We would also love to hear your ideas! Even if you can't implement it yourself, it could inspire others.

Sponsoring

Work on Pion's congestion control and bandwidth estimation was funded through the User-Operated Internet fund, a fund established by NLnet made possible by financial support from the PKT Community/The Network Steward and stichting Technology Commons Trust.

Community

Pion has an active community on the Slack.

Follow the Pion Twitter for project updates and important WebRTC news.

We are always looking to support your projects. Please reach out if you have something to build! If you need commercial support or don't want to use public methods you can contact us at [email protected]

Contributing

Check out the contributing wiki to join the group of amazing people making this project possible

License

MIT License - see LICENSE for full text

# Packages

HTTP server that demonstrates Pion WebRTC examples.

# Functions

CertificateFromPEM creates a fresh certificate based on a string containing pem blocks fort the private key and x509 certificate.
CertificateFromX509 creates a new WebRTC Certificate from a given PrivateKey and Certificate This can be used if you want to share a certificate across multiple PeerConnections.
ConfigureCongestionControlFeedback registers congestion control feedback as defined in RFC 8888 (https://datatracker.ietf.org/doc/rfc8888/).
ConfigureNack will setup everything necessary for handling generating/responding to nack messages.
ConfigureRTCPReports will setup everything necessary for generating Sender and Receiver Reports.
ConfigureSimulcastExtensionHeaders enables the RTP Extension Headers needed for Simulcast.
ConfigureTWCCHeaderExtensionSender will setup everything necessary for adding a TWCC header extension to outgoing RTP packets.
ConfigureTWCCSender will setup everything necessary for generating TWCC reports.
GatheringCompletePromise is a Pion specific helper function that returns a channel that is closed when gathering is complete.
GenerateCertificate causes the creation of an X.509 certificate and corresponding private key.
NewAPI Creates a new API object for keeping semi-global settings to WebRTC objects It uses the default Codecs and Interceptors unless you customize them using WithMediaEngine and WithInterceptorRegistry respectively.
NewCertificate generates a new x509 compliant Certificate to be used by DTLS for encrypting data sent over the wire.
NewICECandidatePair returns an initialized *ICECandidatePair for the given pair of ICECandidate instances.
NewICECandidateType takes a string and converts it into ICECandidateType.
NewICEConnectionState takes a string and converts it to ICEConnectionState.
NewICEGatheringState takes a string and converts it to ICEGatheringState.
NewICEProtocol takes a string and converts it to ICEProtocol.
NewICETCPMux creates a new instance of ice.TCPMuxDefault.
NewICETransport creates a new NewICETransport.
NewICETransportPolicy takes a string and converts it to ICETransportPolicy.
NewICEUDPMux creates a new instance of ice.UDPMuxDefault.
NewNetworkType allows create network type from string It will be useful for getting custom network types from external config.
NewPeerConnection creates a PeerConnection with the default codecs and interceptors.
NewRTPCodecType creates a RTPCodecType from a string.
NewRTPTransceiverDirection defines a procedure for creating a new RTPTransceiverDirection from a raw string naming the transceiver direction.
NewSDPType creates an SDPType from a string.
NewTrackLocalStaticRTP returns a TrackLocalStaticRTP.
NewTrackLocalStaticSample returns a TrackLocalStaticSample.
RegisterDefaultInterceptors will register some useful interceptors.
UnmarshalStatsJSON unmarshals a Stats object from JSON.
WithInterceptorRegistry allows providing Interceptors to the API.
WithMediaEngine allows providing a MediaEngine to the API.
WithPayloader allows the user to override the Payloader.
WithRTPStreamID sets the RTP stream ID for this TrackLocalStaticRTP.
WithSettingEngine allows providing a SettingEngine to the API.

# Constants

AttributeRtxPayloadType is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream payload type.
AttributeRtxSequenceNumber is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream sequence number.
AttributeRtxSsrc is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream SSRC.
BundlePolicyBalanced indicates to gather ICE candidates for each media type in use (audio, video, and data).
BundlePolicyMaxBundle indicates to gather ICE candidates for only one track.
BundlePolicyMaxCompat indicates to gather ICE candidates for each track.
BundlePolicyUnknown is the enum's zero-value.
CodecTypeDecode means the attached CodecStats represents a media format that the implementation is prepared to decode.
CodecTypeEncode means the attached CodecStats represents a media format that is being encoded, or that the implementation is prepared to encode.
DataChannelStateClosed indicates that the underlying data transport has been closed or could not be established.
DataChannelStateClosing indicates that the procedure to close down the underlying data transport has started.
DataChannelStateConnecting indicates that the data channel is being established.
DataChannelStateOpen indicates that the underlying data transport is established and communication is possible.
DataChannelStateUnknown is the enum's zero-value.
DTLSRoleAuto defines the DTLS role is determined based on the resolved ICE role: the ICE controlled role acts as the DTLS client and the ICE controlling role acts as the DTLS server.
DTLSRoleClient defines the DTLS client role.
DTLSRoleServer defines the DTLS server role.
DTLSRoleUnknown is the enum's zero-value.
DTLSTransportStateClosed indicates that the transport has been closed intentionally as the result of receipt of a close_notify alert, or calling close().
DTLSTransportStateConnected indicates that DTLS has completed negotiation of a secure connection and verified the remote fingerprint.
DTLSTransportStateConnecting indicates that DTLS is in the process of negotiating a secure connection and verifying the remote fingerprint.
DTLSTransportStateFailed indicates that the transport has failed as the result of an error (such as receipt of an error alert or failure to validate the remote fingerprint).
DTLSTransportStateNew indicates that DTLS has not started negotiating yet.
DTLSTransportStateUnknown is the enum's zero-value.
ICECandidateTypeHost indicates that the candidate is of Host type as described in https://tools.ietf.org/html/rfc8445#section-5.1.1.1.
ICECandidateTypePrflx indicates that the candidate is of Peer Reflexive type.
ICECandidateTypeRelay indicates the candidate is of Relay type as described in https://tools.ietf.org/html/rfc8445#section-5.1.1.2.
ICECandidateTypeSrflx indicates the candidate is of Server Reflexive type as described https://tools.ietf.org/html/rfc8445#section-5.1.1.2.
ICECandidateTypeUnknown is the enum's zero-value.
ICEComponentRTCP indicates that the ICE Transport is used for RTCP as defined by https://tools.ietf.org/html/rfc5245#section-4.1.1.1.
ICEComponentRTP indicates that the ICE Transport is used for RTP (or RTCP multiplexing), as defined in https://tools.ietf.org/html/rfc5245#section-4.1.1.1.
ICEComponentUnknown is the enum's zero-value.
ICEConnectionStateChecking indicates that any of the ICETransports are in the "checking" state and none of them are in the "disconnected" or "failed" state.
ICEConnectionStateClosed indicates that the PeerConnection's isClosed is true.
ICEConnectionStateCompleted indicates that all ICETransports are in the "completed" or "closed" state and at least one of them is in the "completed" state.
ICEConnectionStateConnected indicates that all ICETransports are in the "connected", "completed" or "closed" state and at least one of them is in the "connected" state.
ICEConnectionStateDisconnected indicates that any of the ICETransports are in the "disconnected" state and none of them are in the "failed" state.
ICEConnectionStateFailed indicates that any of the ICETransports are in the "failed" state.
ICEConnectionStateNew indicates that any of the ICETransports are in the "new" state and none of them are in the "checking", "disconnected" or "failed" state, or all ICETransports are in the "closed" state, or there are no transports.
ICEConnectionStateUnknown is the enum's zero-value.
ICECredentialTypeOauth describes token based credential as described in https://tools.ietf.org/html/rfc7635.
ICECredentialTypePassword describes username and password based credentials as described in https://tools.ietf.org/html/rfc5389.
ICEGathererStateClosed indicates the closed state can only be entered when the ICEGatherer has been closed intentionally by calling close().
ICEGathererStateComplete indicates the ICEGatherer has completed gathering.
ICEGathererStateGathering indicates gather() has been called, and the ICEGatherer is in the process of gathering candidates.
ICEGathererStateNew indicates object has been created but gather() has not been called.
ICEGathererStateUnknown is the enum's zero-value.
ICEGatheringStateComplete indicates that at least one ICETransport exists, and all ICETransports are in the "completed" gathering state.
ICEGatheringStateGathering indicates that any of the ICETransports are in the "gathering" state.
ICEGatheringStateNew indicates that any of the ICETransports are in the "new" gathering state and none of the transports are in the "gathering" state, or there are no transports.
ICEGatheringStateUnknown is the enum's zero-value.
ICEProtocolTCP indicates the URL uses a TCP transport.
ICEProtocolUDP indicates the URL uses a UDP transport.
ICEProtocolUnknown is the enum's zero-value.
ICERoleControlled indicates that an ICE agent that waits for the controlling agent to select the final choice of candidate pairs.
ICERoleControlling indicates that the ICE agent that is responsible for selecting the final choice of candidate pairs and signaling them through STUN and an updated offer, if needed.
ICERoleUnknown is the enum's zero-value.
ICETransportPolicyAll indicates any type of candidate is used.
ICETransportPolicyRelay indicates only media relay candidates such as candidates passing through a TURN server are used.
ICETransportStateChecking indicates the ICETransport has received at least one remote candidate, and a local and remote ICECandidateComplete dictionary was not added as the last candidate.
ICETransportStateClosed indicates the ICETransport has shut down and is no longer responding to STUN requests.
ICETransportStateCompleted indicates the ICETransport tested all appropriate candidate pairs and at least one functioning candidate pair has been found.
ICETransportStateConnected indicates the ICETransport has received a response to an outgoing connectivity check, or has received incoming DTLS/media after a successful response to an incoming connectivity check, but is still checking other candidate pairs to see if there is a better connection.
ICETransportStateDisconnected indicates the ICETransport has received at least one local and remote candidate, but the final candidate was received yet and all appropriate candidate pairs thus far have been tested and failed.
ICETransportStateFailed indicates the ICETransport the last candidate was added and all appropriate candidate pairs have either failed connectivity checks or have lost consent.
ICETransportStateNew indicates the ICETransport is waiting for remote candidates to be supplied.
ICETransportStateUnknown is the enum's zero-value.
MediaKindAudio indicates this is audio stats.
MediaKindVideo indicates this is video stats.
MimeTypeAV1 AV1 MIME type Note: Matching should be case insensitive.
MimeTypeFlexFEC FEC MIME Type Note: Matching should be case insensitive.
MimeTypeG722 G722 MIME type Note: Matching should be case insensitive.
MimeTypeH264 H264 MIME type.
MimeTypeH265 H265 MIME type Note: Matching should be case insensitive.
MimeTypeOpus Opus MIME type Note: Matching should be case insensitive.
MimeTypePCMA PCMA MIME type Note: Matching should be case insensitive.
MimeTypePCMU PCMU MIME type Note: Matching should be case insensitive.
MimeTypeRTX RTX MIME type Note: Matching should be case insensitive.
MimeTypeVP8 VP8 MIME type Note: Matching should be case insensitive.
MimeTypeVP9 VP9 MIME type Note: Matching should be case insensitive.
NetworkTypeTCP4 indicates TCP over IPv4.
NetworkTypeTCP6 indicates TCP over IPv6.
NetworkTypeUDP4 indicates UDP over IPv4.
NetworkTypeUDP6 indicates UDP over IPv6.
NetworkTypeUnknown is the enum's zero-value.
PeerConnectionStateClosed indicates the peer connection is closed and the isClosed member variable of PeerConnection is true.
PeerConnectionStateConnected indicates that all ICETransports and DTLSTransports are in the "connected", "completed" or "closed" state and at least one of them is in the "connected" or "completed" state.
PeerConnectionStateConnecting indicates that any of the ICETransports or DTLSTransports are in the "connecting" or "checking" state and none of them is in the "failed" state.
PeerConnectionStateDisconnected indicates that any of the ICETransports or DTLSTransports are in the "disconnected" state and none of them are in the "failed" or "connecting" or "checking" state.
PeerConnectionStateFailed indicates that any of the ICETransports or DTLSTransports are in a "failed" state.
PeerConnectionStateNew indicates that any of the ICETransports or DTLSTransports are in the "new" state and none of the transports are in the "connecting", "checking", "failed" or "disconnected" state, or all transports are in the "closed" state, or there are no transports.
PeerConnectionStateUnknown is the enum's zero-value.
QualityLimitationReasonBandwidth means the resolution and/or framerate is primarily limited due to congestion cues during bandwidth estimation.
QualityLimitationReasonCPU means the resolution and/or framerate is primarily limited due to CPU load.
QualityLimitationReasonNone means the resolution and/or framerate is not limited.
QualityLimitationReasonOther means the resolution and/or framerate is primarily limited for a reason other than the above.
RTCPMuxPolicyNegotiate indicates to gather ICE candidates for both RTP and RTCP candidates.
RTCPMuxPolicyRequire indicates to gather ICE candidates only for RTP and multiplex RTCP on the RTP candidates.
RTCPMuxPolicyUnknown is the enum's zero-value.
RTPCodecTypeAudio indicates this is an audio codec.
RTPCodecTypeUnknown is the enum's zero-value.
RTPCodecTypeVideo indicates this is a video codec.
RTPTransceiverDirectionInactive indicates the RTPSender won't offer to send RTP and the RTPReceiver won't offer to receive RTP.
RTPTransceiverDirectionRecvonly indicates the RTPReceiver will offer to receive RTP.
RTPTransceiverDirectionSendonly indicates the RTPSender will offer to send RTP.
RTPTransceiverDirectionSendrecv indicates the RTPSender will offer to send RTP and the RTPReceiver will offer to receive RTP.
RTPTransceiverDirectionUnknown is the enum's zero-value.
SCTPTransportStateClosed indicates a SHUTDOWN or ABORT chunk is received or when the SCTP association has been closed intentionally, such as by closing the peer connection or applying a remote description that rejects data or changes the SCTP port.
SCTPTransportStateConnected indicates the negotiation of an association is completed.
SCTPTransportStateConnecting indicates the SCTPTransport is in the process of negotiating an association.
SCTPTransportStateUnknown is the enum's zero-value.
SDPSemanticsPlanB uses plan-b offers and answers NB: This format should be considered deprecated https://tools.ietf.org/html/draft-uberti-rtcweb-plan-00.
SDPSemanticsUnifiedPlan uses unified-plan offers and answers (the default in Chrome since M72) https://tools.ietf.org/html/draft-roach-mmusic-unified-plan-00.
SDPSemanticsUnifiedPlanWithFallback prefers unified-plan offers and answers, but will respond to a plan-b offer with a plan-b answer.
SDPTypeAnswer indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete.
SDPTypeOffer indicates that a description MUST be treated as an SDP offer.
SDPTypePranswer indicates that a description MUST be treated as an SDP answer, but not a final answer.
SDPTypeRollback indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state.
SDPTypeUnknown is the enum's zero-value.
SignalingStateClosed indicates The PeerConnection has been closed.
SignalingStateHaveLocalOffer indicates that a local description, of type "offer", has been successfully applied.
SignalingStateHaveLocalPranswer indicates that a remote description of type "offer" has been successfully applied and a local description of type "pranswer" has been successfully applied.
SignalingStateHaveRemoteOffer indicates that a remote description, of type "offer", has been successfully applied.
SignalingStateHaveRemotePranswer indicates that a local description of type "offer" has been successfully applied and a remote description of type "pranswer" has been successfully applied.
SignalingStateStable indicates there is no offer/answer exchange in progress.
SignalingStateUnknown is the enum's zero-value.
StatsICECandidatePairStateFailed means a check for this pair was already done and failed, either never producing any response or producing an unrecoverable failure response.
StatsICECandidatePairStateFrozen means a check for this pair hasn't been performed, and it can't yet be performed until some other check succeeds, allowing this pair to unfreeze and move into the Waiting state.
StatsICECandidatePairStateInProgress means a check has been sent for this pair, but the transaction is in progress.
StatsICECandidatePairStateSucceeded means a check for this pair was already done and produced a successful result.
StatsICECandidatePairStateWaiting means a check has not been performed for this pair, and can be performed as soon as it is the highest-priority Waiting pair on the check list.
StatsTypeCandidatePair is used by ICECandidatePairStats.
StatsTypeCertificate is used by CertificateStats.
StatsTypeCodec is used by CodecStats.
StatsTypeCSRC is used by RTPContributingSourceStats.
StatsTypeDataChannel is used by DataChannelStats.
StatsTypeInboundRTP is used by InboundRTPStreamStats.
StatsTypeLocalCandidate is used by ICECandidateStats for the local candidate.
StatsTypeMediaPlayout is used by AudioPlayoutStats.
StatsTypeMediaSource is used by AudioSourceStats or VideoSourceStats depending on kind.
StatsTypeOutboundRTP is used by OutboundRTPStreamStats.
StatsTypePeerConnection used by PeerConnectionStats.
StatsTypeReceiver is used by the AudioReceiverStats or VideoReceiverStats depending on kind.
StatsTypeRemoteCandidate is used by ICECandidateStats for the remote candidate.
StatsTypeRemoteInboundRTP is used by RemoteInboundRTPStreamStats.
StatsTypeRemoteOutboundRTP is used by RemoteOutboundRTPStreamStats.
StatsTypeSCTPTransport is used by SCTPTransportStats.
StatsTypeSender is used by the AudioSenderStats or VideoSenderStats depending on kind.
StatsTypeStream is used by MediaStreamStats.
StatsTypeTrack is used by SenderVideoTrackAttachmentStats and SenderAudioTrackAttachmentStats depending on kind.
StatsTypeTransport is used by TransportStats.
TypeRTCPFBACK ..
TypeRTCPFBCCM ..
TypeRTCPFBGoogREMB ..
TypeRTCPFBNACK ..
TypeRTCPFBTransportCC ..

# Variables

ErrCertificateExpired indicates that an x509 certificate has expired.
ErrCodecNotFound is returned when a codec search to the Media Engine fails.
ErrConnectionClosed indicates an operation executed after connection has already been closed.
ErrDataChannelNotOpen indicates an operation executed when the data channel is not (yet) open.
ErrExistingTrack indicates that a track already exists.
ErrFailedToGenerateCertificateFingerprint indicates that we failed to generate the fingerprint used for comparing certificates.
ErrIncorrectSDPSemantics indicates that the PeerConnection was configured to generate SDP Answers with different SDP Semantics than the received Offer.
ErrIncorrectSignalingState indicates that the signaling state of PeerConnection is not correct.
ErrMaxDataChannelID indicates that the maximum number ID that could be specified for a data channel has been exceeded.
ErrModifyingBundlePolicy indicates that an attempt to modify BundlePolicy was made after PeerConnection has been initialized.
ErrModifyingCertificates indicates that an attempt to modify Certificates was made after PeerConnection has been initialized.
ErrModifyingICECandidatePoolSize indicates that an attempt to modify ICECandidatePoolSize was made after PeerConnection has been initialized.
ErrModifyingPeerIdentity indicates that an attempt to modify PeerIdentity was made after PeerConnection has been initialized.
ErrModifyingRTCPMuxPolicy indicates that an attempt to modify RTCPMuxPolicy was made after PeerConnection has been initialized.
ErrNegotiatedWithoutID indicates that an attempt to create a data channel was made while setting the negotiated option to true without providing the negotiated channel ID.
ErrNoCodecsAvailable indicates that operation isn't possible because the MediaEngine has no codecs available.
ErrNoPayloaderForCodec indicates that the requested codec does not have a payloader.
ErrNoRemoteDescription indicates that an operation was rejected because the remote description is not set.
ErrNoSRTPProtectionProfile indicates that the DTLS handshake completed and no SRTP Protection Profile was chosen.
ErrNoTurnCredentials indicates that a TURN server URL was provided without required credentials.
ErrPrivateKeyType indicates that a particular private key encryption chosen to generate a certificate is not supported.
ErrProtocolTooLarge indicates that value given for a DataChannelInit protocol is longer then 65535 bytes.
ErrRegisterHeaderExtensionInvalidDirection indicates that a extension was registered with a direction besides `sendonly` or `recvonly`.
ErrRetransmitsOrPacketLifeTime indicates that an attempt to create a data channel was made with both options MaxPacketLifeTime and MaxRetransmits set together.
ErrRTPSenderNewTrackHasIncorrectEnvelope indicates that the new track has a different envelope than the previous/original.
ErrRTPSenderNewTrackHasIncorrectKind indicates that the new track is of a different kind than the previous/original.
ErrSenderNotCreatedByConnection indicates RemoveTrack was called with a RtpSender not created by this PeerConnection.
ErrSenderWithNoCodecs indicates that a RTPSender was created without any codecs.
ErrSessionDescriptionConflictingFingerprints indicates SetRemoteDescription was called with a SessionDescription that has an conflicting fingerprints.
ErrSessionDescriptionConflictingIcePwd indicates SetRemoteDescription was called with a SessionDescription that contains multiple conflicting ice-pwd values.
ErrSessionDescriptionConflictingIceUfrag indicates SetRemoteDescription was called with a SessionDescription that contains multiple conflicting ice-ufrag values.
ErrSessionDescriptionInvalidFingerprint indicates SetRemoteDescription was called with a SessionDescription that has an invalid fingerprint.
ErrSessionDescriptionMissingIcePwd indicates SetRemoteDescription was called with a SessionDescription that is missing an ice-pwd value.
ErrSessionDescriptionMissingIceUfrag indicates SetRemoteDescription was called with a SessionDescription that is missing an ice-ufrag value.
ErrSessionDescriptionNoFingerprint indicates SetRemoteDescription was called with a SessionDescription that has no fingerprint.
ErrSimulcastProbeOverflow indicates that too many Simulcast probe streams are in flight and the requested SSRC was ignored.
ErrStringSizeLimit indicates that the character size limit of string is exceeded.
ErrTurnCredentials indicates that provided TURN credentials are partial or malformed.
ErrUnbindFailed indicates that a TrackLocal was not able to be unbind.
ErrUnknownType indicates an error with Unknown info.
ErrUnsupportedCodec indicates the remote peer doesn't support the requested codec.

# Structs

AnswerOptions structure describes the options used to control the answer creation process.
API allows configuration of a PeerConnection with APIs that are available in the standard.
AudioPlayoutStats represents one playout path - if the same playout stats object is referenced by multiple RTCInboundRtpStreamStats this is an indication that audio mixing is happening in which case sample counters in this stats object refer to the samples after mixing.
AudioReceiverStats contains audio metrics related to a specific receiver.
AudioSenderStats represents the stats about one audio sender of a PeerConnection object for which one calls GetStats.
AudioSourceStats represents an audio track that is attached to one or more senders.
Certificate represents a x509Cert used to authenticate WebRTC communications.
CertificateStats contains information about a certificate used by an ICETransport.
CodecStats contains statistics for a codec that is currently being used by RTP streams being sent or received by this PeerConnection object.
A Configuration defines how peer-to-peer communication via PeerConnection is established or re-established.
DataChannel represents a WebRTC DataChannel The DataChannel interface represents a network channel which can be used for bidirectional peer-to-peer transfers of arbitrary data.
DataChannelInit can be used to configure properties of the underlying channel such as data reliability.
DataChannelMessage represents a message received from the data channel.
DataChannelParameters describes the configuration of the DataChannel.
DataChannelStats contains statistics related to each DataChannel ID.
DTLSFingerprint specifies the hash function algorithm and certificate fingerprint as described in https://tools.ietf.org/html/rfc4572.
DTLSParameters holds information relating to DTLS configuration.
DTLSTransport allows an application access to information about the DTLS transport over which RTP and RTCP packets are sent and received by RTPSender and RTPReceiver, as well other data such as SCTP packets sent and received by data channels.
ICECandidate represents a ice candidate.
ICECandidateInit is used to serialize ice candidates.
ICECandidatePair represents an ICE Candidate pair.
ICECandidatePairStats contains ICE candidate pair statistics related to the ICETransport objects.
ICECandidateStats contains ICE candidate statistics related to the ICETransport objects.
ICEGatherer gathers local host, server reflexive and relay candidates, as well as enabling the retrieval of local Interactive Connectivity Establishment (ICE) parameters which can be exchanged in signaling.
ICEGatherOptions provides options relating to the gathering of ICE candidates.
ICEParameters includes the ICE username fragment and password and other ICE-related parameters.
ICEServer describes a single STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer.
ICETransport allows an application access to information about the ICE transport over which packets are sent and received.
InboundRTPStreamStats contains statistics for an inbound RTP stream that is currently received with this PeerConnection object.
A MediaEngine defines the codecs supported by a PeerConnection, and the configuration of those codecs.
MediaStreamStats contains statistics related to a specific MediaStream.
OAuthCredential represents OAuth credential information which is used by the STUN/TURN client to connect to an ICE server as defined in https://tools.ietf.org/html/rfc7635.
OfferAnswerOptions is a base structure which describes the options that can be used to control the offer/answer creation process.
OfferOptions structure describes the options used to control the offer creation process.
OutboundRTPStreamStats contains statistics for an outbound RTP stream that is currently sent with this PeerConnection object.
PeerConnection represents a WebRTC connection that establishes a peer-to-peer communications with another PeerConnection instance in a browser, or to another endpoint implementing the required protocols.
PeerConnectionStats contains statistics related to the PeerConnection object.
RemoteInboundRTPStreamStats contains statistics for the remote endpoint's inbound RTP stream corresponding to an outbound stream that is currently sent with this PeerConnection object.
RemoteOutboundRTPStreamStats contains statistics for the remote endpoint's outbound RTP stream corresponding to an inbound stream that is currently received with this PeerConnection object.
RTCPFeedback signals the connection to use additional RTCP packet types.
RTPCapabilities represents the capabilities of a transceiver https://w3c.github.io/webrtc-pc/#rtcrtpcapabilities.
RTPCodecCapability provides information about codec capabilities.
RTPCodecParameters is a sequence containing the media codecs that an RtpSender will choose from, as well as entries for RTX, RED and FEC mechanisms.
RTPCodingParameters provides information relating to both encoding and decoding.
RTPContributingSourceStats contains statistics for a contributing source (CSRC) that contributed to an inbound RTP stream.
RTPDecodingParameters provides information relating to both encoding and decoding.
RTPEncodingParameters provides information relating to both encoding and decoding.
RTPFecParameters dictionary contains information relating to forward error correction (FEC) settings.
RTPHeaderExtensionCapability is used to define a RFC5285 RTP header extension supported by the codec.
RTPHeaderExtensionParameter represents a negotiated RFC5285 RTP header extension.
RTPParameters is a list of negotiated codecs and header extensions https://w3c.github.io/webrtc-pc/#dictionary-rtcrtpparameters-members.
RTPReceiveParameters contains the RTP stack settings used by receivers.
RTPReceiver allows an application to inspect the receipt of a TrackRemote.
RTPRtxParameters dictionary contains information relating to retransmission (RTX) settings.
RTPSender allows an application to control how a given Track is encoded and transmitted to a remote peer.
RTPSendParameters contains the RTP stack settings used by receivers.
RTPTransceiver represents a combination of an RTPSender and an RTPReceiver that share a common mid.
RTPTransceiverInit dictionary is used when calling the WebRTC function addTransceiver() to provide configuration options for the new transceiver.
SCTPCapabilities indicates the capabilities of the SCTPTransport.
SCTPTransport provides details about the SCTP transport.
SCTPTransportStats contains information about a certificate used by an SCTPTransport.
SessionDescription is used to expose local and remote session descriptions.
SettingEngine allows influencing behavior in ways that are not supported by the WebRTC API.
TrackLocalStaticRTP is a TrackLocal that has a pre-set codec and accepts RTP Packets.
TrackLocalStaticSample is a TrackLocal that has a pre-set codec and accepts Samples.
TrackRemote represents a single inbound source of media.
TransportStats contains transport statistics related to the PeerConnection object.
VideoReceiverStats contains video metrics related to a specific receiver.
VideoSenderStats represents the stats about one video sender of a PeerConnection object for which one calls GetStats.
VideoSourceStats represents a video track that is attached to one or more senders.

# Interfaces

A Stats object contains a set of statistics copies out of a monitored component of the WebRTC stack at a specific time.
TrackLocal is an interface that controls how the user can send media The user can provide their own TrackLocal implementations, or use the implementations in pkg/media.
TrackLocalContext is the Context passed when a TrackLocal has been Binded/Unbinded from a PeerConnection, and used in Interceptors.
TrackLocalWriter is the Writer for outbound RTP Packets.

# Type aliases

BundlePolicy affects which media tracks are negotiated if the remote endpoint is not bundle-aware, and what ICE candidates are gathered.
CodecType specifies whether a CodecStats objects represents a media format that is being encoded or decoded.
DataChannelState indicates the state of a data channel.
DTLSRole indicates the role of the DTLS transport.
DTLSTransportState indicates the DTLS transport establishment state.
ICECandidateType represents the type of the ICE candidate used.
ICEComponent describes if the ice transport is used for RTP (or RTCP multiplexing).
ICEConnectionState indicates signaling state of the ICE Connection.
ICECredentialType indicates the type of credentials used to connect to an ICE server.
ICEGathererState represents the current state of the ICE gatherer.
ICEGatheringState describes the state of the candidate gathering process.
ICEGatherPolicy is the ORTC equivalent of ICETransportPolicy.
ICEProtocol indicates the transport protocol type that is used in the ice.URL structure.
ICERole describes the role ice.Agent is playing in selecting the preferred the candidate pair.
ICETransportPolicy defines the ICE candidate policy surface the permitted candidates.
ICETransportState represents the current state of the ICE transport.
MediaKind indicates the kind of media (audio or video).
NetworkType represents the type of network.
PayloadType identifies the format of the RTP payload and determines its interpretation by the application.
PeerConnectionState indicates the state of the PeerConnection.
QualityLimitationReason lists the reason for limiting the resolution and/or framerate.
RTCPMuxPolicy affects what ICE candidates are gathered to support non-multiplexed RTCP.
RTPCodecType determines the type of a codec.
RTPTransceiverDirection indicates the direction of the RTPTransceiver.
SCTPTransportState indicates the state of the SCTP transport.
SDPSemantics determines which style of SDP offers and answers can be used.
SDPType describes the type of an SessionDescription.
SenderAudioTrackAttachmentStats object represents the stats about one attachment of an audio MediaStreamTrack to the PeerConnection object for which one calls GetStats.
SenderVideoTrackAttachmentStats represents the stats about one attachment of a video MediaStreamTrack to the PeerConnection object for which one calls GetStats.
SignalingState indicates the signaling state of the offer/answer process.
SSRC represents a synchronization source A synchronization source is a randomly chosen value meant to be globally unique within a particular RTP session.
StatsICECandidatePairState is the state of an ICE candidate pair used in the ICECandidatePairStats object.
StatsReport collects Stats objects indexed by their ID.
StatsTimestamp is a timestamp represented by the floating point number of milliseconds since the epoch.
StatsType indicates the type of the object that a Stats object represents.