Move player state into server and add headless players
This updates the player state to be held on the server (unless the local state -l
flag is used) and tied to a user so that you can continue listening as you move between machines. There is also a headless player that can be used by any user and will mirror the user's playing. This is done except that syncing up is not working yet.
Other notable changes:
- The song length is now part of the
SongData
stored on the server so that the length can be shown in the UI when we are not playing. - The server keeps a rolling average of the client ping time that can be used in the future for synchronization.
- The docker container is built using
buildah
meaning that access to the GitLab runner's docker socket is not required.
Remaining work for complete headless player support:
- Select single player as "master" that will be followed by other players (one with lowest ping?).
- Compute offset for other players and send that to them.
- Use offset to adjust playing speed to align all players.