Hi , Andrei ,
In the Windows 8 Capture sample Microsoft has the below lines of code
When you press the button to start the device.
EnableButton(false, "Start Device");
// ShowStatusMessage("Starting device");
m_mediaCaptureMgr = new Windows.Media.Capture.MediaCapture();
var settings = new Windows.Media.Capture.MediaCaptureInitializationSettings();
var chosenDevInfo = m_devInfoCollection[EnumedDeviceList2.SelectedIndex];
settings.VideoDeviceId = chosenDevInfo.Id;
if (chosenDevInfo.EnclosureLocation != null && chosenDevInfo.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Back)
{
m_bRotateVideoOnOrientationChange = true;
m_bReversePreviewRotation = false;
}
else if (chosenDevInfo.EnclosureLocation != null && chosenDevInfo.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Front)
{
m_bRotateVideoOnOrientationChange = true;
m_bReversePreviewRotation = true;
}
else
{
m_bRotateVideoOnOrientationChange = false;
}
await m_mediaCaptureMgr.InitializeAsync(settings);
DisplayProperties_OrientationChanged(null);
EnableButton(true, "Start Preview");
EnableButton(true, "StartStopRecord");
EnableButton(true, "Take Photo");
ShowStatusMessage("Device initialized successful");
m_mediaCaptureMgr.RecordLimitationExceeded += new Windows.Media.Capture.RecordLimitationExceededEventHandler(RecordLimitationExceeded); ;
m_mediaCaptureMgr.Failed += new Windows.Media.Capture.MediaCaptureFailedEventHandler(Failed); ;
Does this help ??
Windows.Devices.Enumeration.Panel.Front
Also If I remember correctly if you loop through your enum devices the first one is always the front camera.
thank you