本文介绍了将视频保存到CameraRoll React-Native的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以使用cameraRoll在React-Native上保存视频,对于带有saveImageWithTag()的图像,这很简单,但是我找不到视频的文档。

It´s possible to save a video on React-Native using cameraRoll, for images with saveImageWithTag() it´s easy but i can´t found documentation for videos.

推荐答案

将视频保存到CameraRoll非常容易,我使用以下代码行将其保存。

It is very easy to save a video to CameraRoll, I did it with the following line of code.

 saveVideoToCameraRoll = async (uri) => {
await CameraRoll.saveToCameraRoll(uri, 'video')
}

注意:显然,此功能需要视频的 uri或filePath

NB: Obviously this function expects a uri or filePath of your video.

这篇关于将视频保存到CameraRoll React-Native的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 16:21