Open paulgoetze opened 6 years ago
The current flow requires you to examine the output of the initialization_failed
event handler, if success
is false. This is strange but probably why its there. I would also be in favor of removing that event and reporting initialization success directly through the promise.
@paulgoetze @NeoLegends This is great feedback. We'll take it on board and we'll be sure to post it here if there's any updates related to this :)
Issue found on 21/02/2018.
Is there any reason for passing a
success
argument to the resolved-handler ofSpotify.Player#connect
? Wouldn’t it make more sense to just resolve or reject the promise returned bySpotify.Player#connect
instead of passing asuccess
boolean? (See https://beta.developer.spotify.com/documentation/web-playback-sdk/reference/#api-spotify-player-connect)A related question: What is the reason for having the
ready
event instead of passing the respective data to the resolved-handler ofSpotify.Player#connect
(.then(data)
)?Expected behaviour:
Spotify.Player#connect
is chainable with.then()
&.catch()
Actual behaviour:
success
argument in.then()