The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.
The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).
MDN
The addIceCandidate() method provides a remote candidate to the ICE Agent.
The addIceCandidate() method provides a remote candidate to the ICE Agent. In addition to being added to the remote description, connectivity checks will be sent to the new candidates as long as the "IceTransports" constraint is not set to "none". This call will result in a change to the connection state of the ICE Agent, and may result in a change to media state if it results in different connectivity being established.
MDN
Adds a MediaStream as a local source of audio or video.
Adds a MediaStream as a local source of audio or video. If the negotiation already happened, a new one will be needed for the remote peer to be able to use it.
MDN
This attribute indicates whether the remote peer is able to accept trickled ICE candidates [TRICKLE-ICE].
This attribute indicates whether the remote peer is able to accept trickled ICE candidates [TRICKLE-ICE]. The value is determined based on whether a remote description indicates support for trickle ICE, as defined in Section 4.1.9 of [RTCWEB-JSEP]. Prior to the completion of setRemoteDescription, this value is null.
Abruptly closes a connection.
Abruptly closes a connection.
MDN
The createAnswer method generates an [SDP] answer with the supported configuration for the session that is compatible with the parameters in the remote configuration.
The createAnswer method generates an [SDP] answer with the supported configuration for the session that is compatible with the parameters in the remote configuration. Like createOffer, the returned blob contains descriptions of the local MediaStreams attached to this RTCPeerConnection, the codec/RTP/RTCP options negotiated for this session, and any candidates that have been gathered by the ICE Agent. The options parameter may be supplied to provide additional control over the generated answer.
As an answer, the generated SDP will contain a specific configuration that, along with the corresponding offer, specifies how the media plane should be established. The generation of the SDP must follow the appropriate process for generating an answer.
Session descriptions generated by createAnswer must be immediately usable by setLocalDescription without causing an error as long as setLocalDescription is called reasonably soon. Like createOffer, the returned description should reflect the current state of the system. The session descriptions must remain usable by setLocalDescription without causing an error until at least the end of the fulfillment callback of the returned promise. Calling this method is needed to get the ICE user name fragment and password.
An answer can be marked as provisional, as described in [RTCWEB-JSEP], by setting the type to "pranswer".
If the RTCPeerConnection is configured to generate Identity assertions, then the session description shall contain an appropriate assertion.
If this RTCPeerConnection object is closed before the SDP generation process completes, the USER agent must suppress the result and not resolve or reject the returned promise.
If the SDP generation process completed successfully, the user agent must resolve the returned promise with a newly created RTCSessionDescription object, representing the generated answer.
If the SDP generation process failed for any reason, the user agent must reject the returned promise with a DOMError object of type TBD.
Creates a new RTCDTMFSender, associated to a specific MediaStreamTrack, that will be able to send DTMF phone signaling over the connection.
Creates a new RTCDTMFSender, associated to a specific MediaStreamTrack, that will be able to send DTMF phone signaling over the connection.
MDN
Creates a new RTCDataChannel associated with this connection.
Creates a new RTCDataChannel associated with this connection. The method takes a dictionary as parameter, with the configuration required for the underlying data channel, like its reliability.
MDN
The createOffer method generates a blob of SDP that contains an RFC 3264 offer with the supported configurations for the session, including descriptions of the local MediaStreams attached to this RTCPeerConnection, the codec/RTP/RTCP options supported by this implementation, and any candidates that have been gathered by the ICE Agent.
The createOffer method generates a blob of SDP that contains an RFC 3264 offer with the supported configurations for the session, including descriptions of the local MediaStreams attached to this RTCPeerConnection, the codec/RTP/RTCP options supported by this implementation, and any candidates that have been gathered by the ICE Agent. The options parameter may be supplied to provide additional control over the offer generated.
As an offer, the generated SDP will contain the full set of capabilities supported by the session (as opposed to an answer, which will include only a specific negotiated subset to use); for each SDP line, the generation of the SDP must follow the appropriate process for generating an offer. In the event createOffer is called after the session is established, createOffer will generate an offer that is compatible with the current session, incorporating any changes that have been made to the session since the last complete offer-answer exchange, such as addition or removal of streams. If no changes have been made, the offer will include the capabilities of the current local description as well as any additional capabilities that could be negotiated in an updated offer.
Session descriptions generated by createOffer must be immediately usable by setLocalDescription without causing an error as long as setLocalDescription is called reasonably soon. If a system has limited resources (e.g. a finite number of decoders), createOffer needs to return an offer that reflects the current state of the system, so that setLocalDescription will succeed when it attempts to acquire those resources. The session descriptions must remain usable by setLocalDescription without causing an error until at least the end of the fulfillment callback of the returned promise. Calling this method is needed to get the ICE user name fragment and password.
If the RTCPeerConnection is configured to generate Identity assertions, then the session description shall contain an appropriate assertion.
If this RTCPeerConnection object is closed before the SDP generation process completes, the USER agent must suppress the result and not resolve or reject the returned promise.
If the SDP generation process completed successfully, the user agent must resolve the returned promise with a newly created RTCSessionDescription object, representing the generated offer.
If the SDP generation process failed for any reason, the user agent must reject the returned promise with an DOMError object of type TBD as its argument.
To Do: Discuss privacy aspects of this from a fingerprinting point of view - it's probably around as bad as access to a canvas :-)
Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order.
Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent().
MDN
Initiates the process of obtaining an identity assertion.
Initiates the process of obtaining an identity assertion. Applications need not make this call. It is merely intended to allow them to start the process of obtaining identity assertions before a call is initiated. If an identity is needed, either because the browser has been configured with a default identity provider or because the setIdentityProvider() method was called, then an identity will be automatically requested when an offer or answer is created.
When getIdentityAssertion is invoked, queue a task to run the following steps:
- If the connection's RTCPeerConnection signalingState is closed, abort these steps.
- Request an identity assertion from the IdP.
Returns an array of MediaStream associated with the local end of the connection.
Returns an array of MediaStream associated with the local end of the connection. The array may be empty.
MDN
Returns an array of MediaStream associated with the remote end of the connection.
Returns an array of MediaStream associated with the remote end of the connection. The array may be empty.
MDN
Creates a new RTCStatsReport that contains and allows access to statistics regarding the connection.
Creates a new RTCStatsReport that contains and allows access to statistics regarding the connection.
MDN
Returns the MediaStream with the given id that is associated with local or remote end of the connection.
Returns the MediaStream with the given id that is associated with local or remote end of the connection. If no stream matches, it returns null.
MDN
Returns an enum of type RTCIceConnectionState that describes the ICE connection state for the connection.
Returns an enum of type RTCIceConnectionState that describes the ICE connection state for the connection. When this value changes, a iceconnectionstatechange event is fired on the object. The possible values are:
MDN
Returns an enum of type RTCIceGatheringState that describes the ICE gathering state for the connection.
Returns an enum of type RTCIceGatheringState that describes the ICE gathering state for the connection. The possible values are:
MDN
Returns a RTCSessionDescription describing the session for the local end of the connection.
Returns a RTCSessionDescription describing the session for the local end of the connection. If it has not yet been set, it can be null.
MDN
Is the event handler called when the addstream event is received.
Is the event handler called when the addstream event is received. Such an event is sent when a MediaStream is added to this connection by the remote peer. The event is sent immediately after the call RTCPeerConnection.setRemoteDescription() and doesn't wait for the result of the SDP negotiation.
MDN
Is the event handler called when the datachannel event is received.
Is the event handler called when the datachannel event is received. Such an event is sent when a RTCDataChannel is added to this connection.
MDN
Is the event handler called when the icecandidate event is received.
Is the event handler called when the icecandidate event is received. Such an event is sent when a RTCICECandidate object is added to the script.
MDN
Is the event handler called when the iceconnectionstatechange event is received.
Is the event handler called when the iceconnectionstatechange event is received. Such an event is sent when the value of iceConnectionState changes.
MDN
Is the event handler called when the identityresult event is received.
Is the event handler called when the identityresult event is received. Such an event is sent when an identity assertion is generated, via getIdentityAssertion(), or during the creation of an offer or an answer.
MDN
Is the event handler called when the idpassertionerror event is received.
Is the event handler called when the idpassertionerror event is received. Such an event is sent when the associated identity provider (IdP) encounters an error while generating an identity assertion.
MDN
Is the event handler alled when the idpvalidationerror event is received.
Is the event handler alled when the idpvalidationerror event is received. Such an event is sent when the associated identity provider (IdP) encounters an error while validating an identity assertion.
MDN
Is the event handler called when the negotiationneeded event, sent by the browser to inform that negotiation will be required at some point in the future, is received.
Is the event handler called when the negotiationneeded event, sent by the browser to inform that negotiation will be required at some point in the future, is received.
MDN
Is the event handler called when the peeridentity event, sent when a peer identity has been set and verified on this connection, is received.
Is the event handler called when the peeridentity event, sent when a peer identity has been set and verified on this connection, is received.
MDN
Is the event handler called when the removestream event, sent when a MediaStream is removed from this connection, is received.
Is the event handler called when the removestream event, sent when a MediaStream is removed from this connection, is received.
MDN
Is the event handler called when the signalingstatechange event, sent when the value of signalingState changes, is received.
Is the event handler called when the signalingstatechange event, sent when the value of signalingState changes, is received.
MDN
Returns a RTCIdentityAssertion, that is a couple of a domain name (idp) and a name (name) representing the identity of the remote peer of this connection, once set and verified.
Returns a RTCIdentityAssertion, that is a couple of a domain name (idp) and a name (name) representing the identity of the remote peer of this connection, once set and verified. If no peer has yet been set and verified, this property will return null. Once set, via the appropriate method, it can't be changed.
MDN
Returns a RTCSessionDescription describing the session for the remote end of the connection.
Returns a RTCSessionDescription describing the session for the remote end of the connection. If it has not yet been set, it can be null.
MDN
Removes the event listener previously registered with EventTarget.addEventListener.
Removes the event listener previously registered with EventTarget.addEventListener.
MDN
Removes a MediaStream as a local source of audio or video.
Removes a MediaStream as a local source of audio or video. If the negotiation already happened, a new one will be needed for the remote peer to stop using it.
MDN
Sets the identity provider to be used for a given RTCPeerConnection object.
Sets the identity provider to be used for a given RTCPeerConnection object. Applications need not make this call; if the browser is already configured for an IdP, then that configured IdP might be used to get an assertion.
When the setIdentityProvider() method is invoked, the user agent must run the following steps: - If the connection's RTCPeerConnection signalingState is closed, throw an InvalidStateError exception and abort these steps.
- Set the current identity provider values to the triplet (provider, protocol, usernameHint).
- If any identity provider value has changed, discard any stored identity assertion.
- Identity provider information is not used until an identity assertion is required, either in response to a call to getIdentityAssertion, or a session description is requested with a call to either createOffer or createAnswer.
Changes the local description associated with the connection.
Changes the local description associated with the connection. The description defines the properties of the connection like its codec. The connection is affected by this change and must be able to support both old and new descriptions. The method takes one parameters, a RTCSessionDescription object to set, and returns a Promise.
MDN
Changes the remote description associated with the connection.
Changes the remote description associated with the connection. The description defines the properties of the connection like its codec. The connection is affected by this change and must be able to support both old and new descriptions. The method takes one parameters, a RTCSessionDescription object to set, and returns a Promise.
MDN
Returns an enum of type RTCSignalingState that describes the signaling state of the local connection.
Returns an enum of type RTCSignalingState that describes the signaling state of the local connection. This state describes the SDP offer, that defines the configuration of the connections like the description of the locally associated objects of type MediaStream, the codec/RTP/RTCP options, the candidates gathered by the ICE Agent. When this value changes, a signalingstatechange event is fired on the object. The possible values are:
MDN
The updateIce method updates the ICE Agent process of gathering local candidates and pinging remote candidates.
The updateIce method updates the ICE Agent process of gathering local candidates and pinging remote candidates. If there is a mandatory constraint called "IceTransports" it will control how the ICE engine can act. This can be used to limit the use to TURN candidates by a callee to avoid leaking location information prior to the call being accepted. This call may result in a change to the state of the ICE Agent, and may result in a change to media state if it results in connectivity being established
MDN
The RTCPeerConnection interface represents a WebRTC connection between the local computer and a remote peer. It is used to handle efficient streaming of data between the two peers.
MDN