[英]how to save videos to the gallery in xamarin forms
How to save video to gallery in xamarin forms.I want to save videos that taked to gallery.i used the following code but its not worked.The videonot in the gallery after uploading the video.如何以 xamarin 形式将视频保存到图库。我想保存拍摄到图库的视频。我使用了以下代码但它不起作用。上传视频后视频不在图库中。
var _file = await CrossMedia.Current.TakeVideoAsync(new Plugin.Media.Abstractions.StoreVideoOptions
{
Name = "gtsvideo.mp4",
SaveToAlbum = true,
});
This functionality is not implemented for Android in the plugin yet, it works on iOS only .此功能尚未在插件中为 Android 实现,它仅适用于 iOS 。
If you want to save the file to gallery, you will have to implement the saving yourself manually.如果要将文件保存到图库,则必须手动实现保存。 For tips on how to do that look for a Java implementation of this on Android and replicate it in C#.
有关如何执行此操作的提示,请在 Android 上查找此 Java 实现并将其复制到 C# 中。 Look into documentation for some simple samples.
查看一些简单示例的文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.