I want to edit Xamarin's community toolkit's camera view to record videos in 1280x720 or higher if not available, MP4 format with AAC audio(or anything that is supported by chrome)
I tried editing its source code, compiling and replacing the DLLs. So far I managed to change the resolution successfully, but it changed the audio codec to AMR. I used this function to replace the GetMaxSize in Android/CameraFragment
ASize GetMiddleSize(ASize[]? imageSizes)
{
ASize? maxSize = null;
long maxPixels = 0;
var video = Array.Find(imageSizes, x => x.Height == 720);
if (video != null)
{
return video;
}
else
{
if (imageSizes != null)
{
var length = imageSizes.Length;
return imageSizes[length / 2];
}
}
}