Skip to main content
MediaCaptureInitializationSettings class

Applies to Windows and Windows Phone

Contains initialization settings for the MediaCapture object which are passed to the MediaCapture.InitializeAsync method.

Syntax


var mediaCaptureInitializationSettings = new Windows.Media.Capture.MediaCaptureInitializationSettings();

public sealed class MediaCaptureInitializationSettings

Public NotInheritable Class MediaCaptureInitializationSettings

public ref class MediaCaptureInitializationSettings sealed 

Attributes

[ DualApiPartition()]
[ MarshalingBehavior(Agile)]
[ Threading(Both)]
[ Version(0x06020000)]

Members

The MediaCaptureInitializationSettings class has these types of members:

Constructors

The MediaCaptureInitializationSettings class has these constructors.

ConstructorDescription
MediaCaptureInitializationSettings Creates a new instance of the MediaCaptureInitializationSettings object.

 

Methods

The MediaCaptureInitializationSettings class inherits methods from the Object class (C#/VB/C++).

Properties

The MediaCaptureInitializationSettings class has these properties.

PropertyAccess typeDescription

AudioDeviceId

Read/writeGets the DeviceInformation.Id of the microphone.

AudioProcessing

Read/writeGets or sets a value that specifies the audio processing mode.

MediaCategory

Read/writeGets or set the media category.

PhotoCaptureSource

Read/writeGets or sets the stream that is used for photo capture.

StreamingCaptureMode

Read/writeGets or sets the streaming mode.

VideoDeviceId

Read/writeGets the DeviceInformation.Id of the video camera.

 

Examples

The following example initializes the MediaCaptureInitializationSettings. Call InitializeAsync with these settings to initialize a MediaCapture object.


// Initialize the MediaCaptureInitialzationSettings.
function initCaptureSettings() {
    captureInitSettings = null;
    captureInitSettings = new Windows.Media.Capture.MediaCaptureInitializationSettings();
    captureInitSettings.audioDeviceId = "";
    captureInitSettings.videoDeviceId = "";
    captureInitSettings.streamingCaptureMode = Windows.Media.Capture.StreamingCaptureMode.audioAndVideo;
    captureInitSettings.photoCaptureSource = Windows.Media.Capture.PhotoCaptureSource.videoPreview;
    captureInitSettings.realTimeModeEnabled = true;
    if (deviceList.length > 0)
        captureInitSettings.videoDeviceId = deviceList[0].id;
}

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.Capture
Windows::Media::Capture [C++]

Metadata

Windows.winmd

Capabilities

webcam
microphone