react-native-documents / document-picker

Document Picker for React Native
https://react-native-documents.github.io/
MIT License
1.35k stars 437 forks source link

Audio Duration #564

Closed KrisLau closed 2 years ago

KrisLau commented 2 years ago

Feature request

Adding audio duration to the object returned from pickSingle

Why it is needed

I would like to get the duration of the audio file in order to able to add another feature to my app which would allow for users to be able to overlay audio.

Possible implementation

Not sure if the getInfo method from this library would help: https://github.com/johnsonsu/react-native-sound-player

Code sample

It would be returning an additional duration property for audio type files

vonovak commented 2 years ago

Hello, thank you for the feature request. Implementing this doesn't really make sense in the document picker though, I'd recommend creating / using another native module. Thank you 🙂