timusus / Shuttle

Shuttle Music Player
Other
2.2k stars 478 forks source link

Plugin infrastructure #63

Open Avinash-Bhat opened 7 years ago

Avinash-Bhat commented 7 years ago

Can there be a plugin infrastructure (much like Muzei). The following points can be made as the pluggable-entry into the app.

  1. Media source
  2. Playlist source (think dynamic playlist)
  3. Player Controller

(These are not an exhaustive list and has to be taken as mere suggestions.)

The reason for this is that, the player core will be remaining clean, lean & the additional functionalities will be available via the plugin system.

The users can mix and match what they want and what they like.

So people who doesn't have spotify/google play music, will have an app that is lean without that bloat, and others can install a plugin for the same.

timusus commented 7 years ago
  1. MediaSource is something that's covered by #14, #13 and #5.

  2. I'm trying to think of what a 'pluggable' playlist source might look like. I think it pretty much is that way now - you pass a List of Song objects into the MusicService and that's what becomes your playlist.

  3. The MusicService controls audio playback, so a Player Controller just needs to bind to it and call the appropriate methods.. So I guess it's effectively 'pluggable' as well? I suppose this could be done in a more abstract way, and the Mini-Player as well as the Now Playing screen could then implement it.

If you have some suggestions as to how you might go about this, or what you think the Pluggable API should look like, let me know. Feel free to have a crack at it and make a PR.

Avinash-Bhat commented 7 years ago

@timusus the list I mentioned was just a suggestion. Since there is some progress on the plugin infrastructure, I think this issue seems to be a bit redundant.

In point 2, what I wanted to add is something like support for dynamic playlists. For example what soundcloud is doing or playlist.net is doing. effectively this can be customisable from a different app. Note that this will mean that MusicService use something more dynamic than just a list (ContentProvider?, new Playlist class?) -- maybe this can be detailed in another issue.

In point 3 yes, I was talking about being able to communicate with the MusicService, so that the playback can be controlled from other apps. For example, (assume that) if Shuttle is not going to support Android Wear integration, one can write just the app for this, which will work off the MusicService to achieve the same work. Another example is to make Shuttle work as an MPD so that I can control it from laptop, Raspberry Pi,...

let me know if this issue is too vast for this, and needs to be split up.

Thaodan commented 6 years ago

Another example is to make Shuttle work as an MPD so that I can control it from laptop, Raspberry Pi,...

With http-stream support this would be even better as you can use a local/remote mpd instance as your personal streaming service.