WebRTC
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/Event, can have the following properties:
address- : 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.
- : A string indicating the local address used to communicate with the STUN or TURN server.
This should be set to
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 RTCPeerConnection.iceGatheringState is
gathering, 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 RTCPeerConnection.iceGatheringState is
errorText- : A string providing the STUN reason text returned by the STUN or TURN server.
port- : 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
url- : A string indicating the URL of the STUN or TURN server being used.
- : An object that, in addition to the properties defined in Event/Event, can have the following properties:
Return value
A new RTCPeerConnectionIceErrorEvent object.
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
