
Then finally I was able to find out the video length using react-native-image picker. Luckily react-native-image-picker supports uri for both ios and android. Eventually I found out the I have to modify the uri substring to get the actual path for ios. Every solution I tried wasn't working with github pages and react (react-helmet, react-meta-tags, react-document-meta).
React native media meta how to#
Finally using condition to do whatever I want to do.īut then again I was stuck! react-native-image-picker gives back the file path only for the android but not for the ios. React Helmet is a library that helps you deal with search engines and social media crawlers by adding meta tags to your pages/components. Not sure if this is the answer you were looking for but I was searching for how to update the info your react app shows when you preview the link in some other app.Getting back the meta-data which also includes video duration.Sending the path to the meta-data package.It is used to develop applications for Android, Android TV, iOS, macOS.
React native media meta software#
Get the file path of the media from react-native-image-picker option. React Native is an open-source UI software framework created by Meta Platforms, Inc.I just have to give the filepath to the package and it would return me meta-data of that particular media file. Apart from building the user interface, you are also going to learn a lot about using the expo-av module. Load the audio file Play/pause the audio file Navigate to next track Navigate to the previous track.
The package is called react-native-media-meta. In this tutorial, you are going to build a functioning interface for an audio player with common functionalities like. Then I found out another great package for react-native which gives the meta-data of any media file. But unfortunately it does not have any such option to set the timelimit while a user is selecting and uploading a video from the device gallery.

I thought it would be easy, I would just call a built-in function and boom! It would work! But unfortunately I could not find such a function to call.įirst of all, to take a video I was using a package called react-native-image-picker, that package has the built in option to set the duration limit of a video while recording a video which is great. expo-media-library provides access to the users media library, allowing them to access their.

In my recent project I was stuck when the client asked me to set the timelimit of a video.
