Update on Spotify API not allowing auto play

2020-06-24 15:52发布

问题:

I've been developing a website that uses the Spotify API which links to track via the track URI: spotify:track:--TRACKIDHERE--

For instance a band called Circa Waves and their song 'T Shirt Weather': spotify:track:5DrZ0fdWlP0rtwR6VOsrWt

However, since the update of the Spotify software recently (where the lyrics button was added and the volume changed to the right hand side) when you click the URI the tracks no longer autoplay when Spotify pops up on your computer.

Is there anyway around this? It's a massive usability issue I feel as it takes a user twice as many clicks to achieve the same result... Instead of playing the track which was linked to is highlighted and you have to click it again for it to play.

回答1:

I'm a developer at Spotify. I just created a ticket for fixing this in the new client update. Thanks for the report!

Please report issues like these directly on our Community site in the future. Stack Overflow is not the correct forum for bug reports :)

However, if you have any Spotify Web API related questions, you can ask these on StackOverflow.



回答2:

A track URI (spotify:track:--TRACKIDHERE--) does not autoplay even if the client is not playing anything. It just finds the song in the client. I am also developing a website that makes use of the track URI (its actually our bachelor thesis, so this sets us back alot of weeks), and hope the bug will be fixed!

The track links (example: https://open.spotify.com/track/6q4XYddaLXrw1v23n4Ai4B), will always open the web player for me atleast, and never play from the client.



回答3:

I'm also a Spotify developer. I think there has been some misunderstanding here; we've changed the autoplay behavior such that the client will not autoplay links if the user is playing something else. On the one hand, this is indeed a usability issue since users who were accustomed to the old behavior need to double-click the highlighted track to play it. However, we considered the old behavior an even worse usability issue, since clicking any Spotify link on the web was likely to interrupt your music (or "context hijacking" as we nicknamed the phenomenon).

Although some people liked autoplay, many others did not, and as a result these users were inadvertently trained to avoid clicking any open.spotify.com links at all. For this reason, we changed the client to not autoplay links if it is already playing something. Also, this is more consistent with other media players.

That said, if the client is not playing anything and the link does not play, then it's a bug. Also, directly clicking a play button on a site such as open.spotify.com or last.fm should also play in the client (I just tested this and it works for me). However pages that are automatically opened in the client should not be played or hijack the play context.

We have heard some reports about WebHelper not correctly playing links when the client is paused (this seems to mostly happen on Windows). Also I would be interested to know if Spotify was already running or had to be launched by WebHelper. Can you provide some more details on the situation?