Delegate DelegateOnIceConnectionChange
Delegate to be called when the ICE connection state is changed.
Namespace: Unity.WebRTC
Assembly: Unity.WebRTC.dll
Syntax
public delegate void DelegateOnIceConnectionChange(RTCIceConnectionState state)
Parameters
Type | Name | Description |
---|---|---|
RTCIceConnectionState | state |
|
Remarks
This delegate is called each time the ICE connection state changes during the negotiation process.
Examples
peerConnection.OnIceConnectionChange = state =>
{
if (state == RTCIceConnectionState.Connected || state == RTCIceConnectionState.Completed)
{
foreach (RTCRtpSender sender in peerConnection.GetSenders())
{
sender.SyncApplicationFramerate = true;
}
}
}