We want to help developers like you. Tell us about how you work: http://qsurvey.mozilla.com/s3/Developer-Audience-Survey-V2/?s=mdn

RTCConfiguration

This article is in need of a technical review.

The RTCConfiguration is passed into the RTCPeerConnection object to initialize the ice server configuration.

Properties

Name Type Description
iceServers RTCIceServer[] An array of ice server objects

RTCIceServer Properties

Name Type Description
urls DOMString, Array String, or Array, of STUN or TURN URI(s) for a server to use
username DOMString An account username (optional)
credential DOMString The password associated with username, if given (optional)

Example

var configuration = { iceServers: [{
                          urls: "stun:stun.services.mozilla.com",
                          username: "louis@mozilla.com", 
                          credential: "webrtcdemo"
                      }, {
                          urls: ["stun:stun.example.com", "stun:stun-1.example.com"]
                      }]
};

var pc = new RTCPeerConnection(configuration);

Document Tags and Contributors

 Contributors to this page: jpmedley, williamboman, eharris, teoli, zmi, Jib, Sheppy, wesj
 Last updated by: jpmedley,