WebRTC
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.
- : A string with the name of the event.
It is case-sensitive and browsers always set it to
options- : An object that, in addition of the properties defined in Event/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.
- : A RTCIceCandidate representing the ICE candidate being concerned by the event.
If
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.
- : 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
- : An object that, in addition of the properties defined in Event/Event, can have the following properties:
Return value
A new RTCPeerConnectionIceEvent object, configured as specified in the provided options.
Specifications
Browser compatibility
See also
- WebRTC
- Its usual target: RTCPeerConnection.
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
