RTCPeerConnection

open external class RTCPeerConnection(configuration: RTCConfiguration = definedExternally) : EventTarget(source)

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.

MDN Reference

Constructors

Link copied to clipboard
constructor(configuration: RTCConfiguration = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun addIceCandidate(candidate: RTCIceCandidateInit? = definedExternally)
Link copied to clipboard
fun addIceCandidateAsync(candidate: RTCIceCandidateInit? = definedExternally): Promise<Void>
Link copied to clipboard
Link copied to clipboard
fun addTransceiver(trackOrKind: String, init: RTCRtpTransceiverInit = definedExternally): RTCRtpTransceiver

fun addTransceiver(trackOrKind: MediaStreamTrack, init: RTCRtpTransceiverInit = definedExternally): RTCRtpTransceiver
Link copied to clipboard
Link copied to clipboard
suspend fun createAnswer(options: RTCAnswerOptions = definedExternally): RTCSessionDescriptionInit
Link copied to clipboard
Link copied to clipboard
fun createDataChannel(label: String, dataChannelDict: RTCDataChannelInit = definedExternally): RTCDataChannel
Link copied to clipboard
suspend fun createOffer(options: RTCOfferOptions = definedExternally): RTCSessionDescriptionInit
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun getStats(selector: MediaStreamTrack? = definedExternally): RTCStatsReport
Link copied to clipboard
fun getStatsAsync(selector: MediaStreamTrack? = definedExternally): Promise<RTCStatsReport>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setConfiguration(configuration: RTCConfiguration = definedExternally)
Link copied to clipboard
suspend fun setLocalDescription(description: RTCLocalSessionDescriptionInit = definedExternally)
Link copied to clipboard
Link copied to clipboard