How to Copy a Video File from CaptureVideo to LocalStorage

Asked 2 years ago, Updated 2 years ago, 53 views

We are making a trial production of an app for the iPhone in the Monaca cloud.


captureVideo video files I want to save it in the PERSISTENT area of LocalStorage, but I'm stuck because I don't know how to do it.

If you look at the path of the file obtained by captureVideo on iPhone 5, you will see

/private/var/mobile/containers/Data/Application/...

I don't know how to do getFile because it's in a different area from PERSISTENT and TEMPORARY.

If possible, I would like to do it in a manner that works well on Android.

Thank you in advance.

monaca cordova

2022-09-30 19:33

1 Answers

I found one way to avoid it.
I was able to convert the path of the file returned in captureVideo into a URI, retrieve the FileEntry using resolveLocalFileSystemURI instead of getFile, and move it to the PERSISTENT area.

However, I don't think this method is the best solution because it doesn't seem to be a roundabout direct attack and it doesn't seem to have the ability to convert paths in LocalStorage into URIs.


2022-09-30 19:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.