Class WebcamSource
This component represents a local video sender generating video frames from a local video capture device (webcam).
Inherited Members
Namespace: Microsoft.MixedReality.WebRTC.Unity
Assembly: cs.temp.dll.dll
Syntax
public class WebcamSource : VideoTrackSource
Fields
Constraints
For manual FormatMode, 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. Any negative or zero value means no constraint.
Declaration
public VideoCaptureConstraints Constraints
Field Value
Type | Description |
---|---|
VideoCaptureConstraints |
Remarks
Video capture formats for HoloLens 1 and HoloLens 2 are available here: https://docs.microsoft.com/en-us/windows/mixed-reality/locatable-camera
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 |
FormatMode
Selection mode for the video capture format.
Declaration
public LocalVideoSourceFormatMode FormatMode
Field Value
Type | Description |
---|---|
LocalVideoSourceFormatMode |
VideoProfileId
For manual FormatMode, 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 FormatMode, kind of video profile to use among a list of predefined ones, or an empty string to leave unconstrained.
Declaration
public VideoProfileKind VideoProfileKind
Field Value
Type | Description |
---|---|
VideoProfileKind |
WebcamDevice
Optional identifier of the webcam to use. Setting this value forces using the given webcam, and will fail opening any other webcam. Valid values are obtained by calling GetVideoCaptureDevicesAsync().
Declaration
public VideoCaptureDevice WebcamDevice
Field Value
Type | Description |
---|---|
VideoCaptureDevice |
Remarks
This property is purposely not shown in the Unity inspector window, as there is very little reason to hard-code a value for it, which would only work on a specific device with a given immutable hardware. It is still serialized on the off-chance that there is a valid use case for hard-coding it.
See Also
Methods
OnDisable()
Declaration
protected void OnDisable()
OnEnable()
Declaration
protected void OnEnable()
Update()
Declaration
protected void Update()