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
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
| Specification |
|---|
| WebRTC: Real-Time Communication in Browsers # dom-rtcpeerconnectioniceevent-constructor |
Browser compatibility
| desktop | mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RTCPeerConnectionIceEvent() constructor
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
See also
- WebRTC
- Its usual target:
RTCPeerConnection.