Method SetConfiguration
SetConfiguration(ref RTCConfiguration)
This method sets the current configuration of the RTCPeerConnection This lets you change the ICE servers used by the connection and which transport policies to use.
Declaration
public RTCErrorType SetConfiguration(ref RTCConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
RTCConfiguration | configuration | The changes are not additive; instead, the new values completely replace the existing ones. |
Returns
Type | Description |
---|---|
RTCErrorType | Error code. |
Examples
var configuration = new RTCConfiguration
{
iceServers = new[]
{
new RTCIceServer
{
urls = new[] {"stun:stun.l.google.com:19302"},
username = "",
credential = "",
credentialType = RTCIceCredentialType.Password
}
}
};
var error = myPeerConnection.SetConfiguration(ref configuration);
if(error == RTCErrorType.None)
{
...
}