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.
   Event     RTCPeerConnectionIceEvent  

Properties

A RTCPeerConnectionIceEvent being an Event, this event also implements these properties.  
RTCPeerConnectionIceEvent.candidate Read only 
  Contains the RTCIceCandidate containing the candidate associated with the event, or null if this event indicates that there are no further candidates to come.  

Constructors
 RTCPeerConnectionIceEvent()  Returns a new RTCPeerConnectionIceEvent. It takes two parameters, the first being a DOMString representing the type of the event; the second a dictionary containing the RTCIceCandidate it 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
WebRTC 1.0: Real-Time Communication Between Browsers # rtcpeerconnectioniceevent

Browser compatibility




Desktop
Mobile



Chrome
Edge
Firefox
Internet Explorer
Opera
Safari
WebView Android
Chrome Android
Firefox for Android
Opera Android
Safari on IOS
Samsung Internet




RTCPeerConnectionIceEvent

56
24-56

15
24
No

43
15-43

12

56
≤37-56


56
25-56

24

43
14-43

12

6.0
1.5-6.0



RTCPeerConnectionIceEvent
56
15
24
No
43
12
56
56
24
43
12
6.0


candidate
24
15
24
No
15
12
≤37
25
24
14
12
1.5


url
No
No
No
No
No
12
No
No
No
No
12
No



See also
 WebRTC Its usual target: RTCPeerConnection. 


Found a problem with this page?

Edit on GitHub
Source on GitHub
Report a problem with this content on GitHub
Want to fix the problem yourself? See our Contribution guide.


Last modified: Apr 4, 2022, by MDN contributors


    
{'path': 'public/docs/dom/rtcpeerconnectioniceevent.html', 'source': 'DevDocs.IO'}