Questions tagged [spotify-app]

The Spotify App API is no longer supported by Spotify. It allowed developers to work with Spotify using modern web technologies. For Spotify API questions that are not about the App API, use the [spotify] tag.

The Spotify platform allowed 3rd party developers to create applications using the Spotify Apps API as web applications integrated into the desktop product using Chrome Embedded Framework. It is no longer accepting new changes - announcement.

What Questions should I ask?

Questions using this tag should be about how to use one of these platforms. You may find that, in some cases, a question that arises while developing for these platforms is not Spotify specific; e.g. a common JavaScript question while creating a Spotify App. In many cases, you should tag your question with the tag instead. However, the Spotify platform does have its own idiosyncrasies, so may be appropriate. It is also advisable to include the tag as well, to ensure wider visibility.

Platforms

Spotify Apps API

The newest addition to the platform is the Spotify Apps API, which allows developers to create applications which are tightly integrated to the Spotify application. Such applications are created using a mix of HTML5, JavaScript and CSS. Because of this, as well as the official documentation's usefulness, developers should also find any documentation on HTML5, JavaScript, and CSS (such as the Mozilla Developer Center) useful.

The JavaScript API accessible within the Spotify App environment gives access to classes representing Albums, Tracks and Artists; amongst others.

Useful Resources

200 questions
0
votes
1 answer

spotify models.player.load(...) promise not resolving

Anyone ever notice the Promise from models.player.load("context","playing"); simply doesn't come back (which is to say it neither fails nor dones)? This doesn't happen every time I try the operation, only sporadically. Working with API version…
bengreenier
  • 285
  • 2
  • 9
0
votes
1 answer

RealtimeAnalyzer memory

I'm trying to write a visualizer for Spotify using the Processing library. But I have a problem with the audio.RealtimeAnalyzer class. var analyzer = audio.RealtimeAnalyzer.forPlayer(models.player); analyzer.addEventListener('audio', function(data){…
Laurens
  • 5
  • 3
0
votes
0 answers

Cannot load external API's in index.html

I am trying to run the following code in Spotify apps but gapi.client is considered undefined. I do not have this problem when running in chrome. Does anyone know why or how this is happening. …
Aakash282
  • 27
  • 9
0
votes
1 answer

RealtimeAnalyzer Exit Out Once Criteria Has Been Met

Hey I'm stuck on this small Spotify app I'm putting together to help practice new songs. It simply grabs a start time and end time and then once activated, continues to loop over it - good for learning difficult sections in a track. Problem: I can…
Mick Davies
  • 93
  • 1
  • 2
  • 11
0
votes
1 answer

Spotify change:context event

I have the following code: function initializeUI(){ //More code here models.player.addEventListener('change:context', contextChanged); //More code here } var timerId = null; function contextChanged() { …
Mr Jones
  • 1,188
  • 3
  • 17
  • 33
0
votes
1 answer

Cannot get user session country value

I can't get the country code from the Session, apparently, if I refer to Spotify API 1.x get user session, it is simple as: require(['$api/models','$api/library#Library'], function(models,Library) { console.log("country=" +…
vdesabou
  • 17
  • 4
0
votes
2 answers

Intermittent issue with tracks snapshot for current user top list

I have a problem when executing this code: require(['$api/models','$api/library#Library'], function(models,Library) { // THIS ONLY HAPPEN FOR TOP LIST var uri=Library.forCurrentUser().toplist.uri; // IF YOU USE ANY OTHER PLAYLIST IT WORKS FINE // …
vdesabou
  • 17
  • 4
0
votes
1 answer

Incorrect snapshot length returned for a specific playlist

I have a problem when using this spotify playlist spotify:user:juan20150:playlist:5rl5QaWjWtEPv9a057w3qc This is the first playlist I've seen which has this problem. The snapshot length returned is 290, but when I do snapshot.loadAll, it returns…
vdesabou
  • 17
  • 4
0
votes
1 answer

Spotify APIs: error when trying to add a track to a playlist for the first time, the second attempt works

I getting this error when adding a track to a playlist for the first time: Uncaught TypeError: Cannot read property 'length' of undefined core.js:598 Then I run the script again, and it works!!! :-o The code is relatively armless and you can see…
giacecco
  • 661
  • 1
  • 5
  • 8
0
votes
1 answer

Spotify app: Fire function on change position

In a Spotify HTML5 app (version 1.0), how do I call a function every time the current position of the player changes (models.player.position)? I mean, like a setInterval millisecond function, but in sync with the player. I've tried "change:track"…
josemmo
  • 6,523
  • 3
  • 35
  • 49
0
votes
1 answer

Return Top Track Spotify API

I am trying to create a helper file that will return the top track(s) of any artist's related artists. All I want to do use 1 artist URI to surface their related artists' name, popularity, and top track. And I want to separate out the top track…
cusejuice
  • 10,285
  • 26
  • 90
  • 145
0
votes
1 answer

Append to Spotify playlist

API v1, Spotify v 0.9.4.185 I don't seem to be able to append songs to a playlist. This works: playlist.tracks.insert(playlist_tracks.ref(playlist_tracks.length-1), tracks_to_append) This doesn't:…
Thomas
  • 3,348
  • 4
  • 35
  • 49
0
votes
1 answer

Remove tracks from playlist in spotify

Want to delete all songs from the playlist up to the selected song. This code is crashing Spotify so I can't see what the complaint is but I believe its happening as soon as the first call to remove the track happens. If I comment out the remove…
Thomas
  • 3,348
  • 4
  • 35
  • 49
0
votes
1 answer

Compare Spotify uri's

Spotify Apps API v1 Trying to determine if the song currently playing is from the playlist that was dropped into my app. However there seems to be two forms of a playlist…
Thomas
  • 3,348
  • 4
  • 35
  • 49
0
votes
1 answer

Chaining load calls in Spotify apps api

Using API v1. Not sure how frequently I'll have to do stuff like this, but I suspect a fair bit. I want to check if the user is the owner of a playlist dropped. Is it possible to do this without the nested load chaining below? I see that Promises…
Thomas
  • 3,348
  • 4
  • 35
  • 49
1 2 3
13
14