Show / Hide Table of Contents

    Class LocalVideoSource

    This component represents a local video source added as a video track to an existing WebRTC peer connection and sent to the remote peer. The video track can optionally be displayed locally with a MediaPlayer.

    Inheritance
    Object
    VideoSource
    LocalVideoSource
    Inherited Members
    VideoSource.FrameQueue
    VideoSource.VideoStreamStarted
    VideoSource.VideoStreamStopped
    Namespace: Microsoft.MixedReality.WebRTC.Unity
    Assembly: cs.temp.dll.dll
    Syntax
    public class LocalVideoSource : VideoSource

    Fields

    AutoAddTrack

    Automatically register as a video track when the peer connection is ready.

    Declaration
    public bool AutoAddTrack
    Field Value
    Type Description
    Boolean
    Remarks

    If this is false then the user needs to manually call Microsoft.MixedReality.WebRTC.PeerConnection.AddLocalVideoTrackAsync(Microsoft.MixedReality.WebRTC.PeerConnection.VideoCaptureDevice,bool) to add a video track to the peer connection and start sending video data to the remote peer.

    AutoStartCapture

    Automatically start local video capture when this component is enabled.

    Declaration
    public bool AutoStartCapture
    Field Value
    Type Description
    Boolean

    Constraints

    For manual Mode, optional constraints on the resolution and framerate of the capture format. These constraints are additive, meaning a matching format must satisfy all of them at once, in addition of being restricted to the formats supported by the selected video profile or kind of profile.

    Declaration
    public VideoCaptureConstraints Constraints
    Field Value
    Type Description
    VideoCaptureConstraints

    EnableMixedRealityCapture

    Enable Mixed Reality Capture (MRC) if available on the local device. This option has no effect on devices not supporting MRC, and is silently ignored.

    Declaration
    public bool EnableMixedRealityCapture
    Field Value
    Type Description
    Boolean

    EnableMRCRecordingIndicator

    Enable the on-screen recording indicator when Mixed Reality Capture (MRC) is available and enabled. This option has no effect on devices not supporting MRC, or if MRC is not enabled.

    Declaration
    public bool EnableMRCRecordingIndicator
    Field Value
    Type Description
    Boolean

    Mode

    Selection mode for the video capture format.

    Declaration
    public LocalVideoSourceFormatMode Mode
    Field Value
    Type Description
    LocalVideoSourceFormatMode

    PeerConnection

    Peer connection this local video source will add a video track to.

    Declaration
    public PeerConnection PeerConnection
    Field Value
    Type Description
    PeerConnection

    PreferredVideoCodec

    Name of the preferred video codec, or empty to let WebRTC decide. See https://en.wikipedia.org/wiki/RTP_audio_video_profile for the standard SDP names.

    Declaration
    public string PreferredVideoCodec
    Field Value
    Type Description
    String

    VideoProfileId

    For manual Mode, unique identifier of the video profile to use, or an empty string to leave unconstrained.

    Declaration
    public string VideoProfileId
    Field Value
    Type Description
    String

    VideoProfileKind

    For manual Mode, kind of video profile to use among a list of predefined ones, or an empty string to leave unconstrained.

    Declaration
    public PeerConnection.VideoProfileKind VideoProfileKind
    Field Value
    Type Description
    PeerConnection.VideoProfileKind

    Methods

    Awake()

    Declaration
    protected void Awake()

    OnDestroy()

    Declaration
    protected void OnDestroy()

    OnDisable()

    Callback when the Unity component is disabled. This is the proper way to disable the video source and get it to stop video capture.

    Declaration
    protected void OnDisable()

    OnEnable()

    Callback when the Unity component is enabled. This is the proper way to enable the video source and get it to start video capture and enqueue video frames.

    Declaration
    protected void OnEnable()
    Back to top Generated by DocFX