docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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

    RTCIceConnectionState value.

    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;
            }
        }
    }

    See Also

    RTCIceConnectionState
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)