Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

RTCIceServer.credential

This article needs an editorial review. How you can help.

Draft
This page is not complete.

I'm experimenting with structure for pages documenting members of dictionaries. Please contact sheppy with any feedback.

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.

The RTCIceServer dictionary's credential property is a string providing the credential to use when connecting to the described server. This is typically a password, key, or other secret.

This value is used when the RTCIceServer describes a TURN server.

Syntax

var iceServer = {
                  ...
                  credential = credential,
                  ...
                };

var credential = iceServer.credential;

iceServer.credential = newCredential;

Example

This example creates a new RTCPeerConnection which will use a TURN server at turnserver.example.org to negotiate connections. Logging into the TURN server will use the username "webrtc" and the creative password "turnpassword".

myPeerConnection = new RTCPeerConnection({
  iceServers: [
    {
      urls: "turn:turnserver.example.org",  // A TURN server
      username: "webrtc",
      credential: "turnpassword"
    }
  ]
});

Specifications

Specification Status Comment
WebRTC 1.0: Real-time Communication Between Browser
The definition of 'RTCIceServer.credential' in that specification.
Working Draft Initial specification.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 22 (22) ? ? ?
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? (Yes) 22.0 (22) ? ? ?

See also

Document Tags and Contributors

 Contributors to this page: Sheppy
 Last updated by: Sheppy,