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

loadBlob() error -- inserts the string "blob" into the <audio> element's src #3716

Closed
Johnrobmiller opened this issue May 22, 2024 · 1 comment · Fixed by #3719
Closed

loadBlob() error -- inserts the string "blob" into the <audio> element's src #3716

Johnrobmiller opened this issue May 22, 2024 · 1 comment · Fixed by #3719
Labels

Comments

@Johnrobmiller
Copy link
Contributor

Johnrobmiller commented May 22, 2024

This is probably the same bug reported here, but there's no way to know for sure: #3672

As seen in the screenshot, when I use loadBlob(), it inserts the string "blob" into the <audio> src. I see that the browser treats this as a link to /blob, but there is no such resource. Navigating to that resource results in 404.

I am using Next.js

I am using loadBlob() like this, where ws is a WaveSurfer instance and data is of type Blob.

Code: ws.loadBlob(track.data)

image

@Johnrobmiller Johnrobmiller changed the title loadBlob() broken -- it inserts the string "blob" into the <audio> element's src May 22, 2024
@katspaugh
Copy link
Owner

katspaugh commented May 23, 2024

Thanks for the report!
Looks like it’s coming from this line: https://github.com/katspaugh/wavesurfer.js/blob/main/src/wavesurfer.ts#L475

As a workaround, please make sure your blob has a correct content type, e.g. audio/mpeg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants