Friday, February 9, 2024
HomeiOS Developmentios - .NET MAUI MediaPicker CaptureVideo digital camera decision

ios – .NET MAUI MediaPicker CaptureVideo digital camera decision


I’m at present constructing an app for IOS with .NET Maui. The concept is to first make the app obtainable for IOS and later for Android.

It’s important for the app to shoot prime quality photographs and video’s.
I simply began the venture this week and I’m taking part in round to attempt some key functionalities.

The issue I’m dealing with is that the MediaPicker doesnt appear to make use of the machine digital camera with all of the functionalities the digital camera has. The largest situation is the standard/decision of the video.

For capturing a video I’ve to date the next code:

if (MediaPicker.IsCaptureSupported)
{
    FileResult file = await MediaPicker.CaptureVideoAsync();
    
    if (file != null)
    {
        _localFilePath = Path.Mix(FileSystem.CacheDirectory, file.FileName);
        utilizing Stream srcStream = await file.OpenReadAsync();
        utilizing FileStream localFileStream = File.OpenWrite(_localFilePath);
        await srcStream.CopyToAsync(localFileStream);
        
        mediaElement.Supply = MediaSource.FromFile(_localFilePath);
        SemanticScreenReader.Announce(TestLabel.Textual content);
    }
}
else
{
    await Shell.Present.DisplayAlert("Oops..", "Your machine isn't supported", "Okay");
}

Does anybody have a suggestion the right way to get a greater video/picture decision in a Maui app?

Thanks upfront!



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments