[GH-ISSUE #1565] WASM Audio backend support #708

Closed
opened 2026-02-27 19:32:04 +03:00 by kerem · 2 comments
Owner

Originally created by @AniAdamPashut on GitHub (Sep 1, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1565

Sorry for ignoring the template, I just couldn't make it work

Why Yes:

Currently we are in a state where we need to implement each audio back-end separately. This makes it hard to work on cross-platform applications, and, we will never be able to make it work for everyone (Even if we would support each back-end we could still not support the weird dude that installed TempleOS). If we support WASM, we support browsers that everyone have, thus we support everyone by default.
Furthermore, while this library is great we are coupled to native programs. We can't really use modern battle-tested UI frameworks easily (i.e. React, Angular, Vue, you do you here tbh). Now I know native UI are not-that-bad-now but I don't see it

Why Not:

  1. It requires work (Actually doing a bunch of work)
  2. It requires supporting another back-end (Supporting it in the future)
  3. It is (might) be outside of the project scope.
  4. Will Probably not be easy (The work that is needed to be done is probably hard)
  5. Native applications might just be enough

Anyway, please let me know if you plan (or not) to implement support for WASM (and if you don't I might just implement it myself 🙃)
Thank you for reading and have a blessed day!

Originally created by @AniAdamPashut on GitHub (Sep 1, 2025). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1565 Sorry for ignoring the template, I just couldn't make it work ## Why Yes: Currently we are in a state where we need to implement each audio back-end separately. This makes it hard to work on cross-platform applications, and, we will never be able to make it work for everyone (Even if we would support each back-end we could still not support the weird dude that installed TempleOS). If we support WASM, we support browsers that everyone have, thus we support everyone by default. Furthermore, while this library is great we are coupled to native programs. We can't really use modern battle-tested UI frameworks easily (i.e. React, Angular, Vue, you do you here tbh). Now I know native UI are not-that-bad-now but I don't see it ## Why Not: 1. It requires work (Actually doing a bunch of work) 2. It requires supporting another back-end (Supporting it in the future) 3. It is (might) be outside of the project scope. 4. Will Probably not be easy (The work that is needed to be done is probably hard) 5. Native applications might just be enough Anyway, please let me know if you plan (or not) to implement support for WASM (and if you don't I might just implement it myself 🙃) Thank you for reading and have a blessed day!
kerem 2026-02-27 19:32:04 +03:00
Author
Owner

@kingosticks commented on GitHub (Sep 1, 2025):

I don't understand. Rodio is exactly a cross-platform audio library. It uses CPAL, which appears to support WASM. have you tried to use that. EDIT: I have no idea if this does actually work. There is an old issue at https://github.com/RustAudio/rodio/issues/313

librespot's general WASM support is presumably still gated by https://github.com/librespot-org/librespot/issues/530, which you maybe already saw.

<!-- gh-comment-id:3243167923 --> @kingosticks commented on GitHub (Sep 1, 2025): I don't understand. Rodio is exactly a cross-platform audio library. It uses CPAL, which appears to support WASM. have you tried to use that. EDIT: I have no idea if this does actually work. There is an old issue at https://github.com/RustAudio/rodio/issues/313 librespot's general WASM support is presumably still gated by https://github.com/librespot-org/librespot/issues/530, which you maybe already saw.
Author
Owner

@AniAdamPashut commented on GitHub (Sep 2, 2025):

Than you for pointing this out

I definitely did not see that, sorry for wasting your time.

I'll try to make it work in few days and report my experience.

Have a good day and we can close this one

<!-- gh-comment-id:3243788110 --> @AniAdamPashut commented on GitHub (Sep 2, 2025): Than you for pointing this out I definitely did not see that, sorry for wasting your time. I'll try to make it work in few days and report my experience. Have a good day and we can close this one
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#708
No description provided.