MediaCapture StartPreviewAsync fails
I am trying to start video preview capture from the camera in my UWP app but StartPreviewAsync throws an exception Sample Code: MediaCapture mc = new MediaCapture(); await mc.InitializeAsync(); await mc.StartPreviewAsync(); This error occurs because currently StartPreviewAsync requires a sink to output frames to. This can be fixed by creating a capture element in xaml to display the frames. <CaptureElement Name="captureElement"/> now code can be updated to display the preview to the screen MediaCapture mc = new MediaCapture(); await mc.InitializeAsync(); captureElement.Source = mc; await mc