MixedReality-WebRTC MixedReality-WebRTC
Search Results for

    Show / Hide Table of Contents

    Class VideoReceiver

    Endpoint for a WebRTC remote video track.

    Inheritance
    Object
    MediaReceiver
    VideoReceiver
    Inherited Members
    MediaReceiver.IsLive
    MediaReceiver.Transceiver
    MediaReceiver.MediaLine
    MediaReceiver.OnAddedToMediaLine(MediaLine)
    MediaReceiver.OnRemovedFromMediaLine(MediaLine)
    MediaReceiver.OnDestroy()
    Namespace: Microsoft.MixedReality.WebRTC.Unity
    Assembly: cs.temp.dll.dll
    Syntax
    public class VideoReceiver : MediaReceiver
    Remarks

    Setting this on a video MediaLine will enable the corresponding transceiver to receive. A remote track will be exposed through VideoTrack once a connection is established. The video track can optionally be displayed locally with a VideoRenderer.

    Fields

    VideoStreamStarted

    Event raised when the video stream started.

    When this event is raised, the followings are true:

    • The Track property is a valid remote video track.
    • The IsLive property is true.
    Declaration
    public VideoStreamStartedEvent VideoStreamStarted
    Field Value
    Type Description
    VideoStreamStartedEvent
    Remarks

    This event is raised from the main Unity thread to allow Unity object access.

    VideoStreamStopped

    Event raised when the video stream stopped.

    When this event is raised, the followings are true:

    • The Track property is null.
    • The IsLive property is false.
    Declaration
    public VideoStreamStoppedEvent VideoStreamStopped
    Field Value
    Type Description
    VideoStreamStoppedEvent
    Remarks

    This event is raised from the main Unity thread to allow Unity object access.

    Properties

    MediaKind

    Media kind of the receiver.

    Declaration
    public override MediaKind MediaKind { get; }
    Property Value
    Type Description
    MediaKind
    Overrides
    MediaReceiver.MediaKind

    Track

    Remote track associated with this receiver. null if this object is not receiving at this time.

    Declaration
    public override MediaTrack Track { get; }
    Property Value
    Type Description
    MediaTrack
    Overrides
    MediaReceiver.Track
    Remarks

    This is always a or a

    VideoTrack

    Remote video track receiving data from the remote peer.

    This is null until Transceiver is set to a non-null value and a remote track is added to that transceiver.

    Declaration
    public RemoteVideoTrack VideoTrack { get; }
    Property Value
    Type Description
    RemoteVideoTrack

    Methods

    OnPaired(MediaTrack)

    Internal callback invoked when the receiver is paired with a media track.

    Declaration
    protected override void OnPaired(MediaTrack track)
    Parameters
    Type Name Description
    MediaTrack track

    The media track this receiver is paired with.

    Overrides
    MediaReceiver.OnPaired(MediaTrack)
    Remarks

    This will be called on the Unity update thread.

    OnUnpaired(MediaTrack)

    Internal callback invoked when the receiver is unpaired from a media track.

    Declaration
    protected override void OnUnpaired(MediaTrack track)
    Parameters
    Type Name Description
    MediaTrack track

    The media track this receiver was paired with.

    Overrides
    MediaReceiver.OnUnpaired(MediaTrack)
    Remarks

    This will be called on the Unity update thread.

    In This Article
    Back to top Generated by DocFX