Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jump to track in the context of an album #11

Open
FlorianLoch opened this issue Jul 13, 2018 · 10 comments
Open

Jump to track in the context of an album #11

FlorianLoch opened this issue Jul 13, 2018 · 10 comments
Milestone

Comments

@FlorianLoch
Copy link

This is not a bug, it's more a feature request - but perhaps this is already possible and I just didn't see how to do it.

I want to store the current position in a track to be able to lateron resume at the same position. Getting information about position and current track is easy, the same is resuming.
The problem which I am currently are unable to solve is that I want the context of the track to stay the same so that the subsequent track played is the same as it would have been when playing without interruption.

Is there any way to do this with the current SDK?

I am using version 0.4.0 on Android 8 with the most recent version of the Spotify app for Android.

Thanks for your help!

@FlorianLoch
Copy link
Author

This is possible via the Web API via the "context" option in combination with the "offset" property (https://developer.spotify.com/console/put-play/) - so it should not be impossible to provide the same feature with this SDK I guess... any chance implementing this will be considered in the near future?

@FlorianLoch
Copy link
Author

Any updates or official statement on this? I currently implemented my poc with the Web API - but this has severe drawbacks so I am still wondering whether this gap between native and web API might be tackled at some point?
Would be awesome if this could be considered!

@mdelolmo mdelolmo added the soon This feature or fix is in progress and will be released soon. label Nov 13, 2019
mdelolmo added a commit that referenced this issue Nov 20, 2019
Bump app-remote lib and update changelog
@mdelolmo mdelolmo removed soon This feature or fix is in progress and will be released soon. suggestion labels Nov 20, 2019
@mdelolmo mdelolmo added this to the 7.0.0 milestone Nov 20, 2019
@FlorianLoch
Copy link
Author

I would like to reopen this issue as I am not sure I actually has been resolved - at least I don't see. I was very excited when I got the notification that something was going on in this thread and finally found the time to have a look at what has been added.
If I got it right the skipToIndex() method has been added. And it would solve my issue of being unable to restore the playback state within a given context IF (and I don't see how to efficiently do this especially offline) I would be able to get the index of the currently playing track withing its context, i.e. the current album or playlist.
To me it seems we are now able to skip to an index, which is pretty neat, but as we cannot retrieve the index from the player state I have no idea to which index I actually want to jump.
Could you please clarify on this? Probably I just missed something or got it all wrong ;)

Thanks a lot in advance!

@mdelolmo mdelolmo reopened this Jan 15, 2020
@mdelolmo
Copy link
Contributor

Hi @FlorianLoch
I don't think you missed anything. The feature we developed doesn't seem to suit your needs.
To solve your use-case, we either need to support "skip to track-uri" or provide the index in the player state.

I will bring it up to the team, because I think it makes sense.

Best,
Manuel

@FlorianLoch
Copy link
Author

Any news on this? I am currently working on the topic again, still using the workaround via the Web API (which is not really a workaround as controlling the phone via the Web API for all of my phones only works while Spotify is actually playing... so I can't start playback that way...) so I thought I might ask again ;)

@FlorianLoch
Copy link
Author

Just stumpled over my project leading to this question again - so might I ask one more time whether there is any update on this? ;)

@tobika
Copy link

tobika commented Dec 7, 2020

As you wrote in one of your previous messages I'm using skipToIndex() and I calculate the offset myself with the album information I downloaded before.

@FlorianLoch
Copy link
Author

You mean by looping through the tracks contained in the album and checking for a match with the current tracks identifier? A good workaround, still, I think it's a pitty that this is possible with the Web API but not with the one for Android and the one for iOS.
Do you know whether this works out offline? Assuming I have to album downloaded? If so this might be a viable approach for me :)

@tobika
Copy link

tobika commented Dec 7, 2020

Yes exactly, agree that it's a pitty that we can't use the id.

Offline, personally I have the problem that I can't start playback when offline, but if I switch to airplane mode afterwards the next/prev function calls work. (if album downloaded)

@FlorianLoch
Copy link
Author

Coming back to this 5 years later and actually still keen on developing the app I wanted to build back then... So, most likely there has been no update that would allow to play a track in a given context (like one can via the Web SDK)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants