MediaCaptureDevice Class
A capture device of a MediaCaptureBackend: a camera, a microphone, an audio output or a display surface.
public sealed class MediaCaptureDeviceConstructors
| Name | Description |
|---|---|
| MediaCaptureDevice() |
MediaCaptureDevice()
MediaCaptureBackend.cs- Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public MediaCaptureDevice()No documentation is available.
Properties
| Name | Description |
|---|---|
| Capabilities | Gets the capabilities of the device: the values or the ranges of values of its constrainable properties (e.g. facingMode, sampleRate, echoCancellation, zoom). The deviceId and the groupId are set by the library. For a device with MediaCaptureDevice.VideoModes, the width, height, aspectRatio and frameRate capabilities are computed from the modes. |
| DefaultSettings | Gets the default settings of the device: the values of its constrainable properties that the constraints do not change (e.g. the native sample rate of a microphone, the facingMode of a camera). When several settings satisfy the constraints equally well, the closest to the default ones is selected. |
| GroupId | Gets the identifier of the physical device that the device belongs to (e.g. the microphone and the speakers of a headset), or an empty string when the device is alone. The documents see their own identifiers, derived from it. |
| Id | Gets the identifier of the device in the backend. It must be unique among the devices of the same kind, and stable. |
| Kind | Gets the kind of the device. |
| Label | Gets the label of the device (e.g. External USB Webcam), or an empty string. |
| VideoModes | Gets the native video modes of a camera or a screen (its sizes and frame rates). The default mode is the one of MediaCaptureDevice.DefaultSettings (its width and height), else the first mode. Unless the resizeMode capability excludes crop-and-scale, the library also offers the smaller sizes and frame rates, cropped and scaled down from a native mode (https://w3c.github.io/mediacapture-main/#def-constraint-resizeMode). |
Capabilities
MediaCaptureBackend.csGets the capabilities of the device: the values or the ranges of values of its constrainable properties (e.g. facingMode, sampleRate, echoCancellation, zoom). The deviceId and the groupId are set by the library. For a device with MediaCaptureDevice.VideoModes, the width, height, aspectRatio and frameRate capabilities are computed from the modes.
public MediaTrackCapabilities Capabilities { get; init; }Property value
DefaultSettings
MediaCaptureBackend.csGets the default settings of the device: the values of its constrainable properties that the constraints do not change (e.g. the native sample rate of a microphone, the facingMode of a camera). When several settings satisfy the constraints equally well, the closest to the default ones is selected.
public MediaTrackSettings DefaultSettings { get; init; }Property value
GroupId
MediaCaptureBackend.csVideoModes
MediaCaptureBackend.csGets the native video modes of a camera or a screen (its sizes and frame rates). The default mode is the one of MediaCaptureDevice.DefaultSettings (its width and height), else the first mode. Unless the resizeMode capability excludes crop-and-scale, the library also offers the smaller sizes and frame rates, cropped and scaled down from a native mode (https://w3c.github.io/mediacapture-main/#def-constraint-resizeMode).
public IReadOnlyList<MediaCaptureVideoMode> VideoModes { get; init; }Property value
Methods
| Name | Description |
|---|---|
| ToString() | Returns a string that represents the current object. |