web api constructor
RTCPeerConnectionIceErrorEvent: RTCPeerConnectionIceErrorEvent() constructor
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".
- : A string with the name of the event.
This is usually
options- : An object that, in addition to the properties defined in
Event(), can have the following properties:addressOptionalerrorCode- : 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.
- : 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
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).
- : A positive number indicating the local port used to communicate with the STUN or TURN server.
This should be set to
urlOptional- : A string indicating the URL of the STUN or TURN server being used.
- : An object that, in addition to the properties defined in
Return value
A new RTCPeerConnectionIceErrorEvent object.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.