I have developed windows 8.1 store app, it need to be capture photo by using back camera and post.
MediaCaptureInitializationSettings _captureSettings = new var devices = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture); foreach (var device in devices) { if (device.EnclosureLocation != null && device.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Back) { deviceId = device.Id; break; } } if (!string.IsNullOrEmpty(deviceId)) { _captureSettings.AudioDeviceId = ""; _captureSettings.VideoDeviceId = deviceId; _captureSettings.PhotoCaptureSource = Windows.Media.Capture.PhotoCaptureSource.Photo; _captureSettings.StreamingCaptureMode = Windows.Media.Capture.StreamingCaptureMode.Video; } captureManager = new MediaCapture(); await captureManager.InitializeAsync(_captureSettings); await captureManager.ClearEffectsAsync(MediaStreamType.Photo); capturePreview1.Source = captureManager; await captureManager.StartPreviewAsync(); </code> Here i am getting two devices but that devices EnclosureLocation is null, so i can't find which one is front and back camera. so have decided to get second device from list <code> deviceId = devices[1].Id; </code> but it throws an error like "The current capture source does not have an independent photo stream." in the line of initializing MediaCapture <code> await captureManager.InitializeAsync(_captureSettings); </code>
i have tried in windows surface pro 2 and acer devices. Please advise. Thanks in advance.