The RTCPeerConnectionIceEvent() constructor creates a new RTCPeerConnectionIceEvent object.
On this page
RTCPeerConnectionIceEvent: RTCPeerConnectionIceEvent() constructor
Syntax
js
new RTCPeerConnectionIceEvent(type, options)
Parameters
-
type -
A string with the name of the event. It is case-sensitive and browsers always set it to
icecandidate. optionsOptional-
An object that, in addition of the properties defined in
Event(), can have the following properties:-
candidate -
A
RTCIceCandidaterepresenting the ICE candidate being concerned by the event. Ifnull, the event indicates the end of candidate gathering. -
url -
A string containing the URL of the STUN or TURN server which was used to gather the candidate. If the candidate was not gathered by a STUN or TURN server, this value must be
null, which is also the default value.
-
Return value
A new RTCPeerConnectionIceEvent object, configured as specified in the provided options.
Specifications
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 | 15 | 24 | No | 43 | 12 | 56 | 56 | 24 | 43 | 12 | 6.0 |
See also
- WebRTC
- Its usual target:
RTCPeerConnection.
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceEvent/RTCPeerConnectionIceEvent