Skip to content

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

@JJ-Author

Description

@JJ-Author

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions