$ npm i react-native-media-store
import { MusicFiles, Constants, CoverImage } from "react-native-media-store";
{
SortBy: {
Artist: 'ARTIST',
Album: 'ALBUM',
Title: 'TITLE',
},
SortOrder: {
Ascending: 'ASC',
Descending: 'DESC',
},
}
import {Constants} from 'react-native-media-store';
const sortBy = Constants.SortBy.Title,
const sortOrder = Constants.SortOrder.Ascending,
import { MusicFiles } from "react-native-media-store";
check index.d.ts
If you want to show only a couple of covers in your page using this component instead of cover: true
should yield better performance.
❗ this component runs on the Main thread. using it in larg lists WILL cause performance issues.
Extends Image.
<CoverImage src={"pathToSong"} width={120} height={120} />