web api interface
RTCPeerConnectionIceEvent
The RTCPeerConnectionIceEvent interface represents events that occur in relation to ICE candidates with the target, usually an RTCPeerConnection.
Only one event is of this type: icecandidate.
Instance properties
A RTCPeerConnectionIceEvent being an Event, this event also implements these properties.
candidateRead only- : Contains the
RTCIceCandidatecontaining the candidate associated with the event, ornullif this event indicates that there are no further candidates to come.
- : Contains the
urlRead only Deprecated
Constructors
RTCPeerConnectionIceEvent()- : Returns a new
RTCPeerConnectionIceEvent. It takes two parameters, the first being a string representing the type of the event; the second a dictionary containing theRTCIceCandidateit refers to.
- : Returns a new
Instance methods
A RTCPeerConnectionIceEvent being an Event, this event also implements these properties. There is no specific RTCDataChannelEvent method.
Examples
pc.onicecandidate = (ev) => {
console.log(
`The ICE candidate ('${ev.candidate.candidate}') added to connection.`,
);
};
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
- WebRTC
- Its usual target:
RTCPeerConnection.