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

playback can not be started after powering on a spotify connect device #2

Open
2 tasks
JJ-Author opened this issue Nov 9, 2022 · 0 comments
Open
2 tasks

Comments

@JJ-Author
Copy link

Hey thank for your work, pretty nice.
However I realized a problem. When I power on my spotify connect speaker and open your tool I can not get any music to start playing instead I just get this view

image

clicking on the device button invokes the put play request with return code 202 and nothing happens unless that more warning messages are logged (see console). The problem here is that no song can be selected with your app and also your app does not provide any context in the body of the put request. as a result I need to start my pc then open spotify app and select a playlist... and play from there.

There seem 2 quite easy solution though, would be happy if you could integrate these especially the first one seems pretty convenient for most people I presume.

  • continue playing with last songs played when clicking the speaker (or add a dedicated button for this in the device selection list)
    this is pretty straightforward using https://developer.spotify.com/console/get-recently-played/ getting the last played song and its album / playlist context and then pass this to the put payload of the "play" rest call like this e.g.
{
  "context_uri": "spotify:playlist:4tuReEKVsupVoQOldfIpiu",
  "offset": {
    "uri": "spotify:track:6ho0GyrWZN3mhi9zVRW7xi"
  },
  "position_ms": 0
}
  • provide a close button or similar to abort the device selection (or do not show that in the first place??) so that the user can select a song with from the library e.g. and then pass this to the device (if only one is active) without showing the device selection view again.
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