maui-samples
maui-samples copied to clipboard
Mediapicker takevideo not saving video to album
trafficstars
Use the the latest VS 2022 as of 11 Jan.2025, .Net 9 Use the latest the Mediapicker nuget package
When taking a video from MAUI app on iPhone, and video is NOT saved the album folder. The source code sample is below:
FileResult video = await MediaPicker.Default.CaptureVideoAsync();
// UIVideo.SaveToPhotosAlbum()
// save the file into local storage
string localFilePath = Path.Combine(FileSystem.CacheDirectory, video.FileName);
using Stream sourceStream = await video.OpenReadAsync();
using FileStream localFileStream = File.OpenWrite(localFilePath);
await sourceStream.CopyToAsync(localFileStream);
Additional info: on .Net 9
This is a product issue and not something that has to do with the samples. This functionality is tracked here: https://github.com/dotnet/maui/issues/30439