maui-samples icon indicating copy to clipboard operation
maui-samples copied to clipboard

Mediapicker takevideo not saving video to album

Open xiufengpeng opened this issue 10 months ago • 1 comments
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);

xiufengpeng avatar Jan 12 '25 02:01 xiufengpeng

Additional info: on .Net 9

xiufengpeng avatar Jan 12 '25 02:01 xiufengpeng

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

jfversluis avatar Aug 11 '25 07:08 jfversluis