--- title: RTCPeerConnectionIceEvent slug: Web/API/RTCPeerConnectionIceEvent tags: - API - Experimental - Interface - NeedsTranslation - RTCIceCandidateEvent - Reference - TopicStub - WebRTC translation_of: Web/API/RTCPeerConnectionIceEvent ---
{{APIRef("WebRTC")}}
The RTCPeerConnectionIceEvent
interface represents events that occurs in relation to {{Glossary("ICE")}} candidates with the target, usually an {{domxref("RTCPeerConnection")}}. Only one event is of this type: {{event("icecandidate")}}.
A {{domxref("RTCPeerConnectionIceEvent")}} being an {{domxref("Event")}}, this event also implements these properties.
null
if this event indicates that there are no further candidates to come.RTCPeerConnectionIceEvent
. It takes two parameters, the first being a {{domxref("DOMString")}} representing the type of the event; the second a dictionary containing the {{domxref("RTCIceCandidate")}} it refers to.A {{domxref("RTCPeerConnectionIceEvent")}} being an {{domxref("Event")}}, this event also implements these properties. There is no specific {{domxref("RTCDataChannelEvent")}} method.
pc.onicecandidate = function( ev ) { alert("The ICE candidate (transport address: '" + ev.candidate.candidate + "') has been added to this connection."); }
Specification | Status | Comment |
---|---|---|
{{ SpecName('WebRTC 1.0', '#rtcpeerconnectioniceevent', 'RTCPeerConnectionIceEvent') }} | {{Spec2('WebRTC 1.0')}} | Initial definition. |
{{Compat("api.RTCPeerConnectionIceEvent")}}