I am currently building an app for IOS with .NET Maui. The idea is to first make the app available for IOS and later for Android.
It is essential for the app to shoot high quality images and video’s.
I just started the project this week and I am playing around to try some key functionalities.
The problem I am facing is that the MediaPicker doesnt seem to use the device camera with all the functionalities the camera has. The biggest issue is the quality/resolution of the video.
For capturing a video I have so far the following code:
if (MediaPicker.IsCaptureSupported)
{
FileResult file = await MediaPicker.CaptureVideoAsync();
if (file != null)
{
_localFilePath = Path.Combine(FileSystem.CacheDirectory, file.FileName);
using Stream srcStream = await file.OpenReadAsync();
using FileStream localFileStream = File.OpenWrite(_localFilePath);
await srcStream.CopyToAsync(localFileStream);
mediaElement.Source = MediaSource.FromFile(_localFilePath);
SemanticScreenReader.Announce(TestLabel.Text);
}
}
else
{
await Shell.Current.DisplayAlert("Oops..", "Your device is not supported", "Ok");
}
Does anyone have a suggestion how to get a better video/image resolution in a Maui app?
Thanks in advance!