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

readme error: metadata.common.picture return that is array #2170

Closed
2 tasks done
pointchange opened this issue Jul 24, 2024 · 1 comment · Fixed by #2188
Closed
2 tasks done

readme error: metadata.common.picture return that is array #2170

pointchange opened this issue Jul 24, 2024 · 1 comment · Fixed by #2188
Labels
bug Bug, will addressed with high priority

Comments

@pointchange
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

music-metadata version

No response

JavaScript module eco system

ECMAScript modules (ESM), music-medata ≥ version 8

Current Behavior

my data:

[
{
format: 'image/jpeg',
type: 'Media (e.g. label side of CD)',
description: '',
data: <Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 48 00 48 00 00 ff db 00 43 00 02 01 01 01 01 01 02 01 01 01 02 02 02 02 02 04 03 02 02 02 02 05 04 04 03 ... 221375 more bytes>
}
]

In your README.md, error:
微信图片_20240724172419

In my project, I think it can be right : data:${picture[0].format};base64,${picture[0].data.toString('base64')}

Expected Behavior

No response

Attached audio sample?

  • I have provided sufficient information to reproduce the issue
@pointchange pointchange added the bug Bug, will addressed with high priority label Jul 24, 2024
@Borewit
Copy link
Owner

Borewit commented Aug 1, 2024

The examples are outdated. Since Buffer (picture.data) has been replaced with UInt8Array the toString('base64') no longer works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, will addressed with high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants