-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Android Support for Player Module #337
Comments
I think the audio part is the only one that utilizes platform specific Java classes. Making a variant for Android shouldn't be too difficult considering that (1) I should be able to genralize (2) What's the issue with Zeroconf? If it compiles, you can just disable it by changing the authentication strategy. The default implementation loads the configuration from a file, but you can craft it using builders if you want. Command line arguments are also supported. I'd really like to have more tests for this, but I am not really sure how to approach it. |
@mitschwimmer How are you compiling for Android? |
@devgianlu sorry that I kept you waiting. I did my experiment in an Android Studio Project into which I copied the classes of the player-module. This was built with gradle. |
Regarding my item 2. You are right, zeroconf is not an issue per se and the builders are fine. In hindsight it is confusing that I brought it up. I will edit my proposal. |
I'll start by generalizing the parts of the code that need it. Then I shall create another module ( At this point I can make another repo for |
…ent sink (#337) There are two new modules: - `sink-api` that contains a small amount of code for the sink implementation to be based on - `sink` that implements the default sink using javax.sound
@mitschwimmer I have created a new repository with a barebone implementation of the sink: https://github.com/devgianlu/librespot-android (invited you as a collaborator too) |
Your pace is impressive, to say the least. I hope to have some time tomorrow to contribute. |
I think this can be closed as devgianlu/librespot-android#4 is done. I am going to update the README to include librespot-android. @mitschwimmer I can also include your spoddler project if you continue the development! |
Thanks @devgianlu! I have the feeling I am far away from getting it functional, given my current time constraints 😸 |
Is your feature request related to a problem? Please describe.
I would like to use librespot-java to build a Spotify Player on Android. The current Player Module is not compatible with some Android constraints/idiomatics.
Describe the solution you'd like
Wrapping parts of the implementation behind Interfaces to be able to swap out implementations. So far, I identified the following part.
Describe alternatives you've considered
At first I wanted to see whether this whole undertaking is feasible. I played with a local copy of the codebase and got the player to create a session and authenticate with Spotify's backend. I did this by inlining the configuration and wrapping the calls to "javax.sound.sampled.*" into a stub. This does work, but obviously it can't play any audio yet.
While doing and stepping through your code I realized how much effort has been put into the player module alone. A fork or a reimplementation of the player module to achive Android support seems like a quite massive undertaing.
Additional context
Bonus advantage of my suggestion: Wrapping platform specifics might aid/enable certain automatied "integration" tests.
The text was updated successfully, but these errors were encountered: