Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

player_state_changed event with wrong duration

player_state_changed event with wrong duration

I have a problem with the player_state_changed event and I need help. My React application makes use of Spotify Web Playback SDK to play songs, but when I skip a song the player_state_changed event is triggered multiple times with some inconsistencies:

WObject = WebPlaybackState Object

1st event: I can get data such as name and artists with the correct values, but in WObject and WObject > track_window > current_track the duration property appears with the value of the previous song.

2nd event: The duration appears with a value about 24ms less than the correct one.

3rd event: All values are correct.

What is happening?
Reply
2 Replies

I have the same problem. By verifying with the local state and the previous track we can make it somewhat work but would be great if this could be corrected :+1

Same issue here. And it was already opened in the old issue tracker here: https://github.com/spotify/web-playback-sdk/issues/115

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random