Struct RTCIceServer
Represents a configuration for an ICE server used within WebRTC connections.
Namespace: Unity.WebRTC
Assembly: Unity.WebRTC.dll
Syntax
[Serializable]
public struct RTCIceServer
Remarks
Represents a configuration for an ICE server used within WebRTC connections, including authentication credentials and STUN/TURN server URLs.
Examples
RTCConfiguration configuration = default;
configuration.iceServers = new[] { new RTCIceServer { urls = new[] { "stun:stun.l.google.com:19302" } } };
Fields
credential
Specifies the credential for authenticating with the ICE server.
Declaration
[Tooltip("Optional: specifies the password to use when authenticating with the ICE server")]
public string credential
Field Value
Type | Description |
---|---|
string |
See Also
credentialType
Specifies the type of credential used.
Declaration
[Tooltip("What type of credential the `password` value")]
public RTCIceCredentialType credentialType
Field Value
Type | Description |
---|---|
RTCIceCredentialType |
See Also
urls
An array containing the URLs of STUN or TURN servers to use for ICE negotiation.
Declaration
[Tooltip("Array to set URLs of your STUN/TURN servers")]
public string[] urls
Field Value
Type | Description |
---|---|
string[] |
See Also
username
Specifies the user name for authenticating with the ICE server.
Declaration
[Tooltip("Optional: specifies the username to use when authenticating with the ICE server")]
public string username
Field Value
Type | Description |
---|---|
string |