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

Background playback w/ Foreground Service #1

Open
goto-bus-stop opened this issue Oct 24, 2018 · 1 comment
Open

Background playback w/ Foreground Service #1

goto-bus-stop opened this issue Oct 24, 2018 · 1 comment

Comments

@goto-bus-stop
Copy link
Member

goto-bus-stop commented Oct 24, 2018

The things that the Service needs to do:

  • Maintain websocket connection
    • Reconnect on network changes
    • Reconnect on other network failure
  • Handle advance websocket messages
    • Update the player
    • Update the notification
  • Cache websocket messages so they can be passed to Dart when the app is foregrounded
  • Future: handle chat websocket messages only for mention notifications
  • Handle upvoting and downvoting through the notification box
  • Handle disconnecting through the notification box
    • This should quit the player and the service
    • The app should detect, when foregrounded, that it's no longer connected and navigate to the server list page

Ideally, the player should have a defined API so we can switch between NewPipe and Official™ YouTube™ at build time. Then the Official™ YouTube™ version could be published on the Play Store maybe. For SoundCloud we could use ExoPlayer, the HTTP API, and an API key.

@goto-bus-stop
Copy link
Member Author

Some state should be maintained in the Java part for this to work, I think. chat history, users, and playback state, i think. Things like playlists and play history can be loaded again when the user re-enters the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant