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

Get current track position in playlist #359

Open
vitaliecroitor opened this issue Mar 20, 2024 · 0 comments
Open

Get current track position in playlist #359

vitaliecroitor opened this issue Mar 20, 2024 · 0 comments

Comments

@vitaliecroitor
Copy link

UseCase:
We use Spotify Android SDK to stream music in our app. Every time user opens the music player, we want to continue playback with the next song in the playlist we selected. If the playlist has 5 songs, and the user closed the player at song 2, next time he opens the player we want to start the playlist at song 3 which is last position (2) + next (1).

Problem:
There is no api to get the current position of the track in the current playlist. Ideally, the track position will be passed within the PlayerState object as is on the web api

Issue found on 20.03.2024

SDK Version:

0.8.0

OS Version:

Android 10, 11, 12, 13

Scope(s):

PlayerApi, PlayerState

Steps to reproduce:

  1. Connect to Spotify sdk
  2. Start the playlist playback by uri using PlayerApi.play(uri)
  3. Use the PlayerApi.subscribeToPlayerState() to listen to PlayerState changes

Expected behaviour:

The track position in the playlist is part of the PlayerState object

Actual behaviour:

There is no way to get the position of the currently playing track within the playlist.

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

1 participant