spotify / web-api

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web API ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
981 stars 79 forks source link

Strange behavior in API's /v1/me/player/... #990

Open iagolaguna opened 6 years ago

iagolaguna commented 6 years ago

Hello everyone. I'm creating a Extesion on vscode to remote control spotify using your web api and I found some inconsistencies on api, maybe i misunderstand how this works, but if you can help me, i will be glad. If someone want to see the extension code is here vscodefy

Issue found on Aug 17th 2018.

Endpoint(s):

Scope(s):

Steps to reproduce using a mobile device and a premium account:

  1. When spotify is in foreground give the play
  2. Put spotify in background
  3. Make a request to PUT /v1/me/player/pause
  4. Make a request to PUT /v1/me/player/play
  5. Make a request to GET /v1/me/player/devices

Expected behaviour:

Actual behaviour:

Why do i need this? I need this to don't force user to pick up your phone and put spotify in foreground just for play music again, remote control don't make much sense if this is needed .

jscholes commented 6 years ago

The issue of not being able to resume playback on a mobile device when the app isn't in the foreground isn't specific to this API. I'm on iOS, if I try to resume playback from the Spotify desktop client when the app is running in the background it doesn't work either.

iagolaguna commented 6 years ago

But how Spotify desktop client choose one device? can be a issue of here. I do no how is the code base and how all works but supposing, if i send PUT /v1/me/player/pause to mobile devices will receive a hook. In my mind this issue isn't specific to this API if the app is doing some else request to remove them of GET /v1/me/player/devices or another thing that i do no idea.

If the API after pause the device remove it from the devices list, i think is an issue of here.

What do you think?

iagolaguna commented 6 years ago

Can someone answer me? @jscholes ?

spauldhaliwal commented 6 years ago

I have this issue as well, hopefully a fix is in the pipeline.

ghost commented 5 years ago

See also https://github.com/spotify/web-api/issues/1171 for additional comments (this is the same issue, I think).

QuentinIcky commented 5 years ago

Any way to fix it, one year later ?