docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Delegate DelegateOnTrack

    Delegate to be called after a new track has been added to an RTCRtpReceiver which is part of the connection.

    Namespace: Unity.WebRTC
    Assembly: Unity.WebRTC.dll
    Syntax
    public delegate void DelegateOnTrack(RTCTrackEvent e)
    Parameters
    Type Name Description
    RTCTrackEvent e

    RTCTrackEvent object.

    Remarks

    This delegate is called after a new track has been added to an RTCRtpReceiver which is part of the connection.

    Examples
    MediaStream receiveStream = new MediaStream();
    peerConnection.OnTrack = e =>
    {
        receiveStream.AddTrack(e.Track);
    }

    See Also

    RTCTrackEvent
    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)