Partager via


RTCIceServer object

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

Used to provide the TURN server configuration.

Note  

In the current Microsoft Edge implementation, the TURN server configuration provides both NAT mapped discovery and relaying, however, the STUN schemes are not explicitly supported at this point. STUN server configuration support will be added in a future release. In network topologies with multiple layers of NATs, it is desirable to have a STUN server between every layer of NATs in addition to the TURN servers to minimize the peer to peer network latency.

 

Syntax

dictionary RTCIceServer {
             (DOMString or sequence<DOMString>) urls;
             DOMString                          username;
             DOMString                          credential;
};

Standards information

Dictionary Member Type Description
credential DOMString If the uri element is a TURN URI, then this is the credential to use with that TURN server.
urls DOMString or sequence<DOMString> TURN URI(s) as defined in [RFC7064]and[RFC7065].
username DOMString If this RTCIceServer object represents a TURN server, then this attribute specifies the username to use with that TURN server.

 

RTCIceServer Examples

An example of an array of RTCIceServer objects supporting [MS-TURN]:

[ { urls:"turn:turn.example.org:3478?transport=udp", username: "user", credential:"myPassword"}, 
  { urls:"msturn:turn.example.org:3478?transport=udp", username: "user", credential:"myPassword"} 
]

Note  Microsoft Edge Interop Note: Inclusion of the MSTURN URI triggers use of a proprietary TURN variant described in [MS-TURN], as well as proprietary ICE behavior described in [MS-ICE] and [MS-ICE2]. The MSTURN URI should therefore not be used in scenarios requiring interoperability with other browsers.