I am calling this function MusicFiles.getAll. It returns Something get wrong with musicCursor. Instead, it should return an array of all the music tracks.
MusicFiles.getAll({})
.then(tracks => {
console.log(tracks);
})
.catch(error => {
console.log(error);
});
The expected output is supposed to be something like this.
[
{
id : 1,
title : "La danza del fuego",
author : "Mago de Oz",
album : "Finisterra",
genre : "Folk",
duration : 132132312321, // miliseconds
cover : "file:///sdcard/0/123.png",
blur : "file:///sdcard/0/123.png",
path : "/sdcard/0/la-danza-del-fuego.mp3"
}
]