Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result from getMetadata #9

Open
sampatel037 opened this issue Feb 19, 2020 · 1 comment
Open

Result from getMetadata #9

sampatel037 opened this issue Feb 19, 2020 · 1 comment

Comments

@sampatel037
Copy link

sampatel037 commented Feb 19, 2020

result from getMetadata function only returns
[
{
duration: 0,
uri: './relative/path/to/music.mp3',
}
]

here is my function
async function FileMetadata(uri: string) { try { const metadata = await RNMusicMetadata.getMetadata([uri]); console.log(metadata); } catch (error) { console.log('error', error); } }

IOS: 13.2

Any help would be appreciated

@pooyahrtn
Copy link

Hi, I had the same issue when I read files with react-native-document-picker. The problem was file path. I decoded uri with decodeURIComponent and the problem was solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants