Skip to content
This repository has been archived by the owner. It is now read-only.

Control queue and playback #15

Closed
CoDEmanX opened this issue Mar 26, 2015 · 86 comments
Closed

Control queue and playback #15

CoDEmanX opened this issue Mar 26, 2015 · 86 comments
Labels

Comments

@CoDEmanX
Copy link

@CoDEmanX CoDEmanX commented Mar 26, 2015

There's nothing in the Web API to control a user's current queue and playback (including seek time), but Apps have been deprecated on the other hand and Spotify Connect is proprietary. That leaves no option to implement a new PartiQ* - that's a shame.

Can we expect an open Spotify Connect or new Endpoints in the Web API to remote-control Spotify within like a year or should we forget that there was something as nice as PartiQ once?

I'd prefer additional API features over a built-in solution, because community might want to do queuing differently (e.g. let people vote on suggested tracks and play what receives the most votes instead of first-in/first-out, or group suggested tracks by genre and tempo to avoid too hard switches).

But it doesn't end there: one could create a web app that plays what a certain user plays (like a request show in the radio, but without the need to capture audio of the DJ and send it to all listeners). Maybe even play music on multiple wifi speakers in sync? Or a custom last.fm scrobbler...

  • = Former Spotify app that let your party guests decide what music to play in a quite democratic fashion

Edit: Added "including seek time". -@thelinmichael

@thelinmichael
Copy link
Contributor

@thelinmichael thelinmichael commented Mar 31, 2015

Thanks for your feedback @CoDEmanX. I'm going to add the enhancement label to this issue since it's a very valid feature request, but I can not make any promises that this feature will be available regardless of timespan and scope.

@markbrouch
Copy link

@markbrouch markbrouch commented May 19, 2015

+1 I would love to see this implemented.

@Eastborn
Copy link

@Eastborn Eastborn commented Jun 5, 2015

+1 this would be great

@xeno
Copy link

@xeno xeno commented Jun 30, 2015

+1 I neeeed this please. :)

@sashaperigo
Copy link

@sashaperigo sashaperigo commented Jul 22, 2015

+1 I would love access to a user's queue!

@Hagfjall
Copy link

@Hagfjall Hagfjall commented Jul 24, 2015

+1 I would love this, to be able to control the playback for a user.

@auhsor
Copy link

@auhsor auhsor commented Aug 19, 2015

Please add this support!

@ghost
Copy link

@ghost ghost commented Aug 31, 2015

+1 And be quick about it.

@nicohvi
Copy link

@nicohvi nicohvi commented Sep 5, 2015

+1

2 similar comments
@hunterbridges
Copy link

@hunterbridges hunterbridges commented Sep 7, 2015

+1

@petermakowski
Copy link

@petermakowski petermakowski commented Sep 7, 2015

+1

@command3r
Copy link

@command3r command3r commented Sep 13, 2015

I am working on party playlists for my wedding, and as a developer I would love to use my premium account on spotify just for streaming while I can have custom interfaces and options, like manually defined crossfade for different songs and more, all of which I can work on my own. So, +1

@alairock
Copy link

@alairock alairock commented Oct 9, 2015

+1

@NinnOgTonic
Copy link

@NinnOgTonic NinnOgTonic commented Oct 14, 2015

+1

1 similar comment
@kevinweber
Copy link

@kevinweber kevinweber commented Oct 18, 2015

+1

@AbbieGator
Copy link

@AbbieGator AbbieGator commented Nov 16, 2015

+1 I'd love to be able to queue tracks in the API, that would save me a hell of a lot of hassle with what I'm currently working on.

@ceuk
Copy link

@ceuk ceuk commented Nov 17, 2015

+1 for queueing tracks via the API

@mexitalian
Copy link

@mexitalian mexitalian commented Dec 10, 2015

+1

@forstermatth
Copy link

@forstermatth forstermatth commented Jan 20, 2016

+1 I'd love to use a feature like this to create a slack chat script to control music in the office

@Gavinator98
Copy link

@Gavinator98 Gavinator98 commented Jan 25, 2016

+1

@gartnera
Copy link

@gartnera gartnera commented Jan 31, 2016

+1

3 similar comments
@m4w
Copy link

@m4w m4w commented Feb 28, 2016

+1

@bash
Copy link

@bash bash commented Feb 29, 2016

+1

@ericwebster
Copy link

@ericwebster ericwebster commented Mar 3, 2016

+1

@jordanranson
Copy link

@jordanranson jordanranson commented Nov 4, 2016

The lack of audio control/playback is keeping me from reviving my app I made for Rdio. A shame they had to go out of business. Any update on this?

@lilalinux
Copy link

@lilalinux lilalinux commented Nov 17, 2016

+1
It's unbelievable that the most important function for a music streaming service "playing music" isn't supported by the API.

@brandoncornel
Copy link

@brandoncornel brandoncornel commented Dec 8, 2016

+1

1 similar comment
@pinetrees
Copy link

@pinetrees pinetrees commented Dec 22, 2016

+1

@AnderssonPeter
Copy link

@AnderssonPeter AnderssonPeter commented Dec 22, 2016

@thelinmichael are there any news on this?
Im currently on a Windows 10 Mobile and the Spotify app there does not support controlling other devices if you where to add this functionality we could make our own Spotify remote app.
This way we Windows 10 Mobile users can enjoy Spotify radios and the likes!

@drsounds
Copy link

@drsounds drsounds commented Jan 4, 2017

I am afraid there is a specific reason why we haven't seen any playback API for the desktop and that is that people have made apps such Eternify, where artists could crowdsource streams in order to get more money. I think it's because this Spotify are not providing playback control interface to the public. On mobile the risk is much less that is happen, since mobiles can't be used as a server.
Playback control api on desktop could be abused for a lot of reasons, which could be costly for Spotify and I think it's the reason Spotify has chosen to not provide that functionality to the public.

@daweedm
Copy link

@daweedm daweedm commented Jan 11, 2017

+1

@DeckardKane
Copy link

@DeckardKane DeckardKane commented Feb 15, 2017

@drsounds That sounds like a plausible reason for Spotify to not implement this. Could they just confirm it in a statement saying "We are not implementing this feature and [x reason] is why not". I have been tearing my hair out looking for this functionality, but if it is confirmed to not be a planned feature, I will find another service to use. Just tell us please!

@TigerC10
Copy link

@TigerC10 TigerC10 commented Feb 22, 2017

@DeckardKane / @drsounds - There's at least partial playback control since you can open up a track/playlist/album while one's already going. So, even if the argument is that playback control can be abused - well so what? It can already be abused.

Since libspotify isn't a thing anymore, it'd be really great to at least get this finished out.

@drsounds
Copy link

@drsounds drsounds commented Feb 22, 2017

@brongracz
Copy link

@brongracz brongracz commented Mar 5, 2017

They dont understand that they are missing a market like this. That is automation. Siri can play music. Google can play music. If spotify added that playback control API, it would become automaticly a default playback service for smart homes etc. from brands other than apple and google. Also the spotify connect with playback api could help smartify various devices to make part of automated ecosystems. Making spotify connect a sort of a standard for audio streaming in smart homes etc. equivalent to zigbee ZLL protocol for lightning control.
"You want your smart home to talk to all audio devices, choose a device with spotify connect support" is for now not the case. In fact this could make me look for another subscription.

@drsounds
Copy link

@drsounds drsounds commented Mar 5, 2017

@kfrz
Copy link

@kfrz kfrz commented Mar 19, 2017

Hey guys! I want to chime in because I've been using Spotify Premium for much longer than I've been involved in software development, but I've always wanted to write an extension to shuffle by album, so I can pick fifteen albums or playlists and shuffle but play the whole record before shuffling to a different record. Lo and I see, it's not really possible.

If anyone has suggestions on how it may be possible, I'm still interested in writing this, I just don't think it'll work with the current Web API.

@iangilman
Copy link

@iangilman iangilman commented Mar 20, 2017

@kfrz I know this is a poor substitute for an actual playback API, but the workaround I've been using for my app (http://www.letsfathom.com/) is to have my app make a new playlist and fill it with whatever I want (e.g. 15 albums in random order). I then listen to that playlist once and delete it.

Like I said, it's not as great as an actual playback API, but when you start thinking in terms of these single-use playlists, there's actually a lot of interesting things you can do.

@jscholes
Copy link

@jscholes jscholes commented Mar 20, 2017

I've always wanted to write an extension to shuffle by album, so I can pick fifteen albums or playlists and shuffle but play the whole record before shuffling to a different record.

The availability of an API to control Spotify's playback queue might indeed help with this, but it's not the only way. You just have to think a little bit outside the box, and watch out for rate limits. For example, you could:

  1. Create a new playlist via the Web API.
  2. Create a hash table/dict/whatever your language of choice refers to it as, use it to store your album/playlist objects.
  3. For each album/playlist, fetch the list of tracks using the Web API and store them in an array which will be a value in your dictionary - this is the part which might bite you if you don't take care to avoid Spotify's rate limiting. Once this bit is done, you should have a hash table with Spotify album/playlist URIs for the keys, and lists of matching tracks for the values.
  4. Once you have an ordered list of tracks for each album/playlist, shuffle the dictionary, rather than the track lists. This will give you the albums/playlists in a random order, but the tracks of each won't be shuffled.
  5. Flatten the whole lot to a list of tracks and add them all to the playlist you created in step 1.

You might extend it by caching the track lists locally for albums/playlists that you listen to a lot. Or to make it more flexible, you could do something like:

  1. Create a new playlist in the Spotify client.
  2. Search for the albums/playlists you want to include, again in the client, and drag the tracks for all of them into your new playlist.
  3. Write a script to fetch the entire playlist from the Web API (which will include the album URI for each track), shuffle the tracks based on what album they belong to and then store the shuffled lot into a new playlist or the same one.

The second approach has the downside that you can only shuffle by album, not by playlist. As with many things in software development you have to decide what your priorities are and go from there. This is especially important when developing against a third party system that you don't control.

@kfrz
Copy link

@kfrz kfrz commented Mar 20, 2017

@jscholes -- thanks, that was a great response. I figured I could do something like build a playlist on the fly, so that's probably the way I'll approach it.

@asmitter
Copy link
Member

@asmitter asmitter commented Mar 31, 2017

Thanks everyone for the patience, input and workarounds on these ideas.
We're very pleased to release the following set of endpoints for interacting with playback via Connect: https://developer.spotify.com/web-api/web-api-connect-endpoint-reference/

As they align pretty closely with the discussion here, I'll close this issue. This thread did evolve though, so please open new issues if these new endpoints don't do the trick.

@dreszczyk
Copy link

@dreszczyk dreszczyk commented Apr 13, 2017

Is there a library that covers the last changes?

@lodev09
Copy link

@lodev09 lodev09 commented Apr 20, 2017

@dreszczyk here's my sbotify bot using the new playback stuff :)
https://github.com/lodev09/sbotify

@tjhrulz
Copy link

@tjhrulz tjhrulz commented May 15, 2017

@asmitter Any chance we chould get a playpause command added to it? That way the command does not have to worry about changing itself based on the state of the player

Also will this endpoint ever be available to non premium users even if it is more limited?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.