docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Delegate OnVideoReceived

    Delegate to be called when the first frame of the video is received.

    Namespace: Unity.WebRTC
    Assembly: Unity.WebRTC.dll
    Syntax
    public delegate void OnVideoReceived(Texture renderer)
    Parameters
    Type Name Description
    Texture renderer

    Texture object where the video stream is rendered.

    Remarks

    OnVideoReceived delegate is called when the first frame of the video is received.

    Examples
    [SerializeField]
    RawImage receivedImage;
    
    videoStreamTrack.OnVideoReceived += (texture) =>
    {
        receivedImage.texture = texture;
    }

    See Also

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