interface dom.RTCPeerConnection
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.4.19/lib/index.ts";
const { RTCPeerConnection } = dom;
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.
Properties
readonly
connectionState: RTCPeerConnectionStatereadonly
currentLocalDescription: RTCSessionDescription | nullreadonly
currentRemoteDescription: RTCSessionDescription | nullreadonly
iceConnectionState: RTCIceConnectionStatereadonly
iceGatheringState: RTCIceGatheringStatereadonly
localDescription: RTCSessionDescription | nullonconnectionstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null
ondatachannel: ((this: RTCPeerConnection, ev: RTCDataChannelEvent) => any) | null
onicecandidate: ((this: RTCPeerConnection, ev: RTCPeerConnectionIceEvent) => any) | null
onicecandidateerror: ((this: RTCPeerConnection, ev: RTCPeerConnectionIceErrorEvent) => any) | null
oniceconnectionstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null
onicegatheringstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null
onnegotiationneeded: ((this: RTCPeerConnection, ev: Event) => any) | null
onsignalingstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null
onstatsended: ((this: RTCPeerConnection, ev: RTCStatsEvent) => any) | null
ontrack: ((this: RTCPeerConnection, ev: RTCTrackEvent) => any) | null
readonly
peerIdentity: Promise<RTCIdentityAssertion>readonly
pendingLocalDescription: RTCSessionDescription | nullreadonly
pendingRemoteDescription: RTCSessionDescription | nullreadonly
remoteDescription: RTCSessionDescription | nullreadonly
sctp: RTCSctpTransport | nullreadonly
signalingState: RTCSignalingStateMethods
addIceCandidate(candidate: RTCIceCandidateInit | RTCIceCandidate): Promise<void>
addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender
addTransceiver(trackOrKind: MediaStreamTrack | string, init?: RTCRtpTransceiverInit): RTCRtpTransceiver
createAnswer(options?: RTCOfferOptions): Promise<RTCSessionDescriptionInit>
createDataChannel(label: string, dataChannelDict?: RTCDataChannelInit): RTCDataChannel
createOffer(options?: RTCOfferOptions): Promise<RTCSessionDescriptionInit>
getConfiguration(): RTCConfiguration
getReceivers(): RTCRtpReceiver[]
getSenders(): RTCRtpSender[]
getStats(selector?: MediaStreamTrack | null): Promise<RTCStatsReport>
getTransceivers(): RTCRtpTransceiver[]
removeTrack(sender: RTCRtpSender): void
setConfiguration(configuration: RTCConfiguration): void
setIdentityProvider(provider: string, options?: RTCIdentityProviderOptions): void
setLocalDescription(description: RTCSessionDescriptionInit): Promise<void>
setRemoteDescription(description: RTCSessionDescriptionInit): Promise<void>
addEventListener<K extends keyof RTCPeerConnectionEventMap>(): void
type: K,
listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof RTCPeerConnectionEventMap>(): void
type: K,
listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any,
options?: boolean | EventListenerOptions,