RTCPeerConnectionIceErrorEvent: RTCPeerConnectionIceErrorEvent() constructor
Baseline
2026
Newly available
Since April 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
The RTCPeerConnectionIceErrorEvent() constructor creates a new RTCPeerConnectionIceErrorEvent object with its type and other properties initialized as specified in the parameters.
Note that you will not normally create an object of this type yourself.
Syntax
new RTCPeerConnectionIceErrorEvent(type, options)
Parameters
type-
A string with the name of the event. This is usually
"icecandidateerror". options-
An object that, in addition to the properties defined in
Event(), can have the following properties:addressOptional-
A string indicating the local address used to communicate with the STUN or TURN server. This should be set to
nullif the local IP address has not yet been exposed as part of a local ICE candidate. errorCode-
A positive number providing the STUN error code returned by the STUN or TURN server. If no host candidate can reach the server and the
iceGatheringStateisgathering, this should be set to701. errorTextOptional-
A string providing the STUN reason text returned by the STUN or TURN server.
portOptional-
A positive number indicating the local port used to communicate with the STUN or TURN server. This should be set to
nullif the connection hasn't been established (that is, ifaddressisnull). urlOptional-
A string indicating the URL of the STUN or TURN server being used.
Return value
A new RTCPeerConnectionIceErrorEvent object.
Specifications
| Specification |
|---|
| WebRTC: Real-Time Communication in Browsers> # dom-rtcpeerconnectioniceerrorevent-constructor> |