Skip to main content

Pick audio files

If you are already using react-native-image-picker or expo-image-picker, you may note that,currently it does not support the picking the audio files.

And if you are already using this library, you don't need to add extra dependency for picking audio files.

The pickAudio function is a cross-platform method that allows you to initiate the selection of audio files from the device's file manager on both Android and iOS platforms. It provides a simple and user-friendly way to choose audio files for use in your application.

Usage

import { pickAudio } from 'rnvideoeditor';

const pickAudioAsync = async () => {
try {
const audioFileUri = pickAudio();
console.log('Selected audio file URI:', audioFileUri);
} catch (error) {
console.error('Error picking audio:', error);
}
};