RTCPeerConnectionIceEvent: RTCPeerConnectionIceEvent() constructor

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2018.

The RTCPeerConnectionIceEvent() constructor creates a new RTCPeerConnectionIceEvent object.

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.

options Optional

An object that, in addition of the properties defined in Event(), can have the following properties:

candidate

A RTCIceCandidate representing the ICE candidate being concerned by the event. If null, 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

Specification
WebRTC: Real-Time Communication in Browsers
# dom-rtcpeerconnectioniceevent-constructor

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
RTCPeerConnectionIceEvent() constructor
Chrome – Full support
Chrome 56 (Release date: 2017-01-25)
footnote Full support
Edge – Full support
Edge 15 (Release date: 2017-04-05)
footnote Full support
Firefox – Full support
Firefox 24 (Release date: 2013-09-17)
footnote Full support
Opera – Full support
Opera 43 (Release date: 2017-02-07)
footnote Full support
Safari – Full support
Safari 12 (Release date: 2018-09-17)
footnote Full support
Chrome Android – Full support
Chrome Android 56 (Release date: 2017-02-01)
footnote Full support
Firefox for Android – Full support
Firefox for Android 24 (Release date: 2013-09-17)
footnote Full support
Opera Android – Full support
Opera Android 43 (Release date: 2017-09-27)
footnote Full support
Safari on iOS – Full support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Full support
Samsung Internet – Full support
Samsung Internet 6 (Release date: 2017-08-23)
footnote Full support
WebView Android – Full support
WebView Android 56 (Release date: 2017-02-01)
footnote Full support
WebView on iOS – Full support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

See also