Draft
This page is not complete.
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 credentialType
property is a string value from the RTCIceCredentialType
enum which indicates what type of credential the RTCIceServer.credential
value is. The default is "password".
Syntax
var iceServer = { ... credentialType = ["password" | "token"], ... }; var credential = iceServer.credentialType; iceServer.credential = ["password" | "token"];
Constants
RTCIceCredentialType enum
The RTCIceCredentialType
enum specifies values which can be returned by the credentialType
property to define what kind of authentication credential is being provided in the RTCIceServer.credential
property. This can be one of the values below.
Constant | Description |
---|---|
"password" |
The credential is a long-term authentication password. See RFC 5389, section 10.2 for further details on this type of credential. |
"token" |
The credential is an access token to be used with a third-party authentication system. |
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", credentialType: "password" } ] });
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) | 47 (47)[1] | ? | ? | ? |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | (Yes) | 47.0 (47)[1] | ? | ? | ? |
[1] Although support for this property was added in Firefox 47, Firefox continues to only support password authentication, regardless of what you set the credential type to. See bugĀ 1247616.