Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
sealed interface RTCBundlePolicy
Link copied to clipboard

The RTCCertificate interface of the WebRTC API provides an object representing a certificate that an RTCPeerConnection uses to authenticate.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The RTCDataChannel interface represents a network channel which can be used for bidirectional peer-to-peer transfers of arbitrary data. Every data channel is associated with an RTCPeerConnection, and each peer connection can have up to a theoretical maximum of 65,534 data channels (the actual limit may vary from browser to browser).

Link copied to clipboard

The RTCDataChannelEvent interface represents an event related to a specific RTCDataChannel.

Link copied to clipboard
Link copied to clipboard
sealed interface RTCDataChannelState
Link copied to clipboard
sealed interface RTCDegradationPreference
Link copied to clipboard
Link copied to clipboard
sealed interface RTCDtlsRole
Link copied to clipboard

The RTCDtlsTransport interface provides access to information about the Datagram Transport Layer Security (DTLS) transport over which a RTCPeerConnection's RTP and RTCP packets are sent and received by its RTCRtpSender and RTCRtpReceiver objects.

Link copied to clipboard
sealed interface RTCDtlsTransportState
Link copied to clipboard

The RTCDTMFSender interface provides a mechanism for transmitting DTMF codes on a WebRTC RTCPeerConnection. You gain access to the connection's RTCDTMFSender through the RTCRtpSender.dtmf property on the audio track you wish to send DTMF with.

Link copied to clipboard
open class RTCDTMFToneChangeEvent(val type: EventType<RTCDTMFToneChangeEvent>, init: RTCDTMFToneChangeEventInit = definedExternally) : Event

The RTCDTMFToneChangeEvent interface represents events sent to indicate that DTMF tones have started or finished playing. This interface is used by the tonechange event.

Link copied to clipboard

The RTCEncodedAudioFrame of the WebRTC API represents an encoded audio frame in the WebRTC receiver or sender pipeline, which may be modified using a WebRTC Encoded Transform.

Link copied to clipboard
Link copied to clipboard

The RTCEncodedVideoFrame of the WebRTC API represents an encoded video frame in the WebRTC receiver or sender pipeline, which may be modified using a WebRTC Encoded Transform.

Link copied to clipboard
sealed interface RTCEncodedVideoFrameType
Link copied to clipboard
open class RTCError(init: RTCErrorInit, message: String = definedExternally) : DOMException

The RTCError interface describes an error which has occurred while handling WebRTC operations. It's based upon the standard DOMException interface that describes general DOM errors.

Link copied to clipboard
sealed interface RTCErrorDetailType
Link copied to clipboard

The WebRTC API's RTCErrorEvent interface represents an error sent to a WebRTC object. It's based on the standard Event interface, but adds RTC-specific information describing the error, as shown below.

Link copied to clipboard
Link copied to clipboard
interface RTCErrorInit
Link copied to clipboard
open class RTCIceCandidate(init: RTCLocalIceCandidateInit = definedExternally)

The RTCIceCandidate interface—part of the WebRTC API—represents a candidate Interactive Connectivity Establishment (ICE) configuration which may be used to establish an RTCPeerConnection.

Link copied to clipboard
Link copied to clipboard

The RTCIceCandidatePair dictionary describes a pair of ICE candidates which together comprise a description of a viable connection between two WebRTC endpoints. It is used as the return value from RTCIceTransport.getSelectedCandidatePair() to identify the currently-selected candidate pair identified by the ICE agent.

Link copied to clipboard
Link copied to clipboard
sealed interface RTCIceCandidateType
Link copied to clipboard
sealed interface RTCIceComponent
Link copied to clipboard
sealed interface RTCIceConnectionState
Link copied to clipboard
sealed interface RTCIceGathererState
Link copied to clipboard
sealed interface RTCIceGatheringState
Link copied to clipboard
sealed interface RTCIceProtocol
Link copied to clipboard
sealed interface RTCIceRole
Link copied to clipboard
interface RTCIceServer
Link copied to clipboard
sealed interface RTCIceTcpCandidateType
Link copied to clipboard

The RTCIceTransport interface provides access to information about the ICE transport layer over which the data is being sent and received. This is particularly useful if you need to access state information about the connection.

Link copied to clipboard
sealed interface RTCIceTransportPolicy
Link copied to clipboard
sealed interface RTCIceTransportState
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class RTCPeerConnection(configuration: RTCConfiguration = definedExternally) : EventTarget, JsCloseable

The RTCPeerConnection interface represents a WebRTC connection between the local computer and a remote peer. It provides methods to connect to a remote peer, maintain and monitor the connection, and close the connection once it's no longer needed.

Link copied to clipboard
Link copied to clipboard

The RTCPeerConnectionIceErrorEvent interface—based upon the Event interface—provides details pertaining to an ICE error announced by sending an icecandidateerror event to the RTCPeerConnection object.

Link copied to clipboard

The RTCPeerConnectionIceEvent interface represents events that occur in relation to ICE candidates with the target, usually an RTCPeerConnection.

Link copied to clipboard
sealed interface RTCPeerConnectionState
Link copied to clipboard
sealed interface RTCPriorityType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface RTCRtcpMuxPolicy
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface RTCRtpCodec
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class RTCRtpReceiver

The RTCRtpReceiver interface of the WebRTC API manages the reception and decoding of data for a MediaStreamTrack on an RTCPeerConnection.

Link copied to clipboard
open class RTCRtpScriptTransform(worker: Worker, options: JsAny? = definedExternally, transfer: ReadonlyArray<*> = definedExternally)

The RTCRtpScriptTransform interface of the WebRTC API is used to insert a WebRTC Encoded Transform (a TransformStream running in a worker thread) into the WebRTC sender and receiver pipelines.

Link copied to clipboard

The RTCRtpScriptTransformer interface of the WebRTC API provides a worker-side Stream API interface that a WebRTC Encoded Transform can use to modify encoded media frames in the incoming and outgoing WebRTC pipelines.

Link copied to clipboard
open class RTCRtpSender

The RTCRtpSender interface provides the ability to control and obtain details about how a particular MediaStreamTrack is encoded and sent to a remote peer.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The WebRTC interface RTCRtpTransceiver describes a permanent pairing of an RTCRtpSender and an RTCRtpReceiver, along with some shared state.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The RTCSctpTransport interface provides information which describes a Stream Control Transmission Protocol (SCTP) transport. This provides information about limitations of the transport, but also provides a way to access the underlying Datagram Transport Layer Security (DTLS) transport over which SCTP packets for all of an RTCPeerConnection's data channels are sent and received.

Link copied to clipboard
sealed interface RTCSctpTransportState
Link copied to clipboard
sealed interface RTCSdpType
Link copied to clipboard
Link copied to clipboard

The RTCSessionDescription interface describes one end of a connection—or potential connection—and how it's configured. Each RTCSessionDescription consists of a description type indicating which part of the offer/answer negotiation process it describes and of the SDP descriptor of the session.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface RTCSignalingState
Link copied to clipboard
interface RTCStats
Link copied to clipboard
Link copied to clipboard

The RTCStatsReport interface of the WebRTC API provides a statistics report for a RTCPeerConnection, RTCRtpSender, or RTCRtpReceiver.

Link copied to clipboard
sealed interface RTCStatsType
Link copied to clipboard

The WebRTC API interface RTCTrackEvent represents the track event, which is sent when a new MediaStreamTrack is added to an RTCRtpReceiver which is part of the RTCPeerConnection.

Link copied to clipboard
Link copied to clipboard

The RTCTransformEvent of the WebRTC API represent an event that is fired in a dedicated worker when an encoded frame has been queued for processing by a WebRTC Encoded Transform.

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline suspend fun RTCPeerConnection.addIceCandidate()
inline suspend fun RTCPeerConnection.addIceCandidate(candidate: RTCIceCandidateInit?)

The addIceCandidate() method of the RTCPeerConnection interface adds a new remote candidate to the connection's remote description, which describes the state of the remote end of the connection.

Link copied to clipboard

The createAnswer() method of the RTCPeerConnection interface creates an SDP answer to an offer received from a remote peer during the offer/answer negotiation of a WebRTC connection.

Link copied to clipboard

The createOffer() method of the RTCPeerConnection interface initiates the creation of an SDP offer for the purpose of starting a new WebRTC connection to a remote peer.

Link copied to clipboard

The generateCertificate() static function of the RTCPeerConnection interface creates an X.509 certificate and corresponding private key, returning a promise that resolves with the new RTCCertificate once it's generated.

Link copied to clipboard

The generateKeyFrame() method of the RTCRtpScriptTransformer interface causes a video encoder to generate a key frame.

Link copied to clipboard

The getStats() method of the RTCPeerConnection interface returns a promise which resolves with data providing statistics about either the overall connection or about the specified MediaStreamTrack.

inline suspend fun RTCRtpReceiver.getStats(): RTCStatsReport

The RTCRtpReceiver method getStats() asynchronously requests an RTCStatsReport object which provides statistics about incoming traffic on the owning RTCPeerConnection, returning a Promise whose fulfillment handler will be called once the results are available.

inline suspend fun RTCRtpSender.getStats(): RTCStatsReport

The RTCRtpSender method getStats() asynchronously requests an RTCStatsReport object which provides statistics about outgoing traffic on the RTCPeerConnection which owns the sender, returning a Promise which is fulfilled when the results are available.

Link copied to clipboard
inline suspend fun RTCRtpSender.replaceTrack(withTrack: MediaStreamTrack?)

The RTCRtpSender method replaceTrack() replaces the track currently being used as the sender's source with a new MediaStreamTrack.

Link copied to clipboard

The sendKeyFrameRequest() method of the RTCRtpScriptTransformer interface may be called by a WebRTC Encoded Transform that is processing incoming encoded video frames, in order to request a key frame from the sender.

Link copied to clipboard

The setLocalDescription() method of the RTCPeerConnection interface changes the local description associated with the connection. This description specifies the properties of the local end of the connection, including the media format. The method takes a single parameter—the session description—and it returns a Promise which is fulfilled once the description has been changed, asynchronously.

Link copied to clipboard
inline suspend fun RTCRtpSender.setParameters(parameters: RTCRtpSendParameters)
inline suspend fun RTCRtpSender.setParameters(parameters: RTCRtpSendParameters, setParameterOptions: RTCSetParameterOptions)

The setParameters() method of the RTCRtpSender interface applies changes the configuration of sender's track, which is the MediaStreamTrack for which the RTCRtpSender is responsible.

Link copied to clipboard

The setRemoteDescription() method of the RTCPeerConnection interface sets the specified session description as the remote peer's current offer or answer. The description specifies the properties of the remote end of the connection, including the media format. The method takes a single parameter—the session description—and it returns a Promise which is fulfilled once the description has been changed, asynchronously.