-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Safari parseBlob failure #2221
Comments
I've tried using: https://github.com/MattiasBuelens/web-streams-polyfill It doesn't work. |
Do you have the same issue here using Safari? A workaround is: import {parseBuffer} from 'music-metadata';
let blob; // Assume this Blob is assigned
const metadata = await parseBuffer(await blob.bytes()), {mimeType: blob.type}); (I have not tested it) Ref: |
Is there is any news, feel free to re-open |
I will try to switch from BYOB (bring your own buffer)/byte stream to the default stream. Ref: https://developer.mozilla.org/docs/Web/API/ReadableStream/ReadableStream |
@jonluca can please retry here: https://fallback-on-default-reader--audio-tag-analyzer.netlify.app/ |
Do you mind to try one more time @jonluca ? GUI should show v10.8.0-beta.3", otherwise please reload your browser. |
Any improvement in music-metadata 10.8.1 deployed on https://github.com/Borewit/audio-tag-analyzer @jonluca ? If you experience the same error, can you pinpoint where the out-of-bounds exception occurs? |
Same issue A way to debug might be to use bun - import { parseBlob } from "music-metadata";
import { promises as fs } from "fs";
const data = await fs.readFile("~/Downloads/bohemian-rhapsody.mp3");
const blob = new Blob(data);
const metadata = await parseBlob(blob);
console.log(metadata); bun test.mjs Returns this exception |
That was a pretty dumb attempt, as this is the the same You mind to try another time @jonluca, it may very very well now throw the Range out of bounds error. If you can please indicate where that occurs. |
I dont believe the site has an updated build - it's the same error as earlier. However testing with main with bun seems to be working? I've created a PR that adds a test suite for bun, since it uses JavaScriptCore under the hood, the same engine as Safari. There seems to be a timeout with webstreams in JSC in WavPack but otherwise seems fine. |
I was convinced I merged the music-metadata v10.8.2, but apparently not. Now it is in via Borewit/audio-tag-analyzer#1116. Relevant change is: Borewit/peek-readable@21b34df
Awesome! |
Is there an existing issue for this?
music-metadata version
10.2.0
Current Behavior
When parsing a blob with Safari, I get the following error:
Expected Behavior
No response
Attached audio sample?
The text was updated successfully, but these errors were encountered: