react-native-media-meta
react-native-media-meta copied to clipboard
is it possible to use local URL ?
hi, i have IOS uri/local url from cameraRoll react native, can i use it ? because i always get error using that ? can you tell me path of ios file..
thanks.
We can support this, maybe just change this line.
Hi
In which release are you planing to add the feature?
Could you explain how your would change that line? Right now my asset-libary://asset URLs are returning file not found. Thanks.
@matthewng hi, Have you solved your problem?I have the same problem, I copy the video from the asset-libary://asset URLs and get the first frame, in simulator,it's works well,but in my phone,it's failed.
Hi,
same issue.. I'm using react-native-image-crop-picker to pick a video
ImagePicker.openPicker({
mediaType: 'video',
}).then((video) => {
console.log(video);
console.log(video.path);
MediaMeta.get(video.path)
.then(metadata => console.log(metadata))
.catch(error => console.log(error));
this.onChangeData('video', video);
});
video.path is valid because I can upload the video with this path
file:///Users/Ilario/Library/Developer/CoreSimulator/Devices/4D446481-F623-4B2C-A812-33F0C09D21EB/data/Containers/Data/Application/AE2670F1-91F4-42A8-A9FD-F6D5BC5A8C93/tmp/react-native-image-crop-picker/D2A02363-D4C0-4464-8981-AE51EAA04FD0.mp4
but MediaMeta return Cannot read property 'get' of undefined
I solved removing file:// from path
TESTED ONLY ON IOS SIMULATOR
It always throws a File not found error on Android. My file path is like content://com.google.android.apps.contentproviders/....
EDIT My bad. Using a path instead of a URI works as expected.
Thanks to @Ilario17.
removing file:// works on android as well.