A React Native module that allows you to fetch and manage audios, images, vidoes.
npm install rn-media-library
Check out my dedicated documentation page for all the information about this library, API's and more:
import { getAssets } from 'rn-media-library';
// ...
// call the function inside the useEffect on mount and set the state
getAssets({ mediaType: 'audio' })
.then((res) => {
//parse and set the value in the state
setAssets(JSON.parse(res));
})
.catch((error) => {
console.log(error);
});
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT