Announcements

player_state_changed event with wrong duration

Reply

player_state_changed event with wrong duration

RuanMelo
Visitor
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?
2 Replies

Re: player_state_changed event with wrong duration

tobikabla
Casual Listener

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

Re: player_state_changed event with wrong duration

kruemeline
Casual Listener
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