spotify / ios-sdk

Spotify SDK for iOS
https://developer.spotify.com/documentation/ios/
661 stars 188 forks source link

Feature Request: Authorise and play URI with trackIndex #425

Open Fump opened 5 months ago

Fump commented 5 months ago

Hi!

We have a use case where we want to start Spotify music playback of a playlist at a pre-selected trackIndex.

This is possible when connected to the Spotify app through the app remote by using: SPTAppRemotePlayerAPI playItem:skipToTrackIndex:callback:.

However if the Spotify app isn't running in the background we need to launch it before connecting by calling SPTAppRemote authorizeAndPlayURI: or SPTSessionManager initiateSession. Here we can specify a playlist URI to initiate playlist playback when launching Spotify app, but we can't specify what playlist trackIndex we want to start playing when Spotify launches.

I would like to suggest additions to SPTAppRemote and/or SPTConfiguration to allow specifying skipToTrackIndex for associated playURI (if applicable) for when launching the Spotify app from the SDK.

Thanks for your time and consideration!