This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
The RTCPeerConnectionIceEvent interface represents events that occurs in relation to ICE candidates with the target, usually an RTCPeerConnection. Only one event is of this type: icecandidate.
Properties
A RTCPeerConnectionIceEvent being an Event, this event also implements these properties.
RTCPeerConnectionIceEvent.candidateRead only- Contains the
RTCIceCandidatecontaining the candidate associated with the event.
Constructors
RTCPeerConnectionIceEvent()- Returns a new RTCPeerConnectionIceEvent. It takes two parameters, the first being a
DOMStringrepresenting the type of the event; the second a dictionary containing theRTCIceCandidateit refers to.
Methods
A RTCPeerConnectionIceEvent being an Event, this event also implements these properties. There is no specific RTCDataChannelEvent method.
Examples
pc.onicecandidate = function( ev ) {
alert("The ICE candidate (transport address: '" +
ev.candidate.candidate +
"') has been added to this connection.");
}
Specifications
| Specification | Status | Comment |
|---|---|---|
| WebRTC 1.0: Real-time Communication Between Browsers The definition of 'RTCPeerConnectionIceEvent' in that specification. |
Working Draft | Initial definition. |
Browser compatibility
| Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support | (Yes)[1] | (Yes) | (Yes) | No support | (Yes) | ? |
| Feature | Android Webview | Chrome for Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|---|
| Basic support | (Yes)[1] | (Yes)[1] | (Yes) | ? | No support | ? | ? |
[1] Before Chrome 56, this was implemented as RTCIceCandidateEvent.
See also
- WebRTC
- Its usual target:
RTCPeerConnection.