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

Bug: Track Duration Changes in the End of Playback

Bug: Track Duration Changes in the End of Playback

Plan

Free/Premium

Country

Brazil

Device

Acert NitroV15 Laptop

Operating System

Windows 11

 

My Question or Issue

Hi! I'm developing a tracking solution for Spotify's embedded iframe player to be used with Google Tag Manager (based on basic guidelines available in this post).


The solution development is going fine, thanks, but I noticed that some tracks simply have their duration slightly changed when the playback approaches the tracks' end:

 

Spotify Bug - Song Duration Change within Playlist Track.png

 

As you can see, from dataLayer's event 15 till dataLayer's event 17 the duration is different (and it shouldn't, because the track hasn't changed), and I wonder it this was expected or even planned at all.

 

So I found a workaround by using Math.round() to eliminate the decimal part, but this is just strange and I thought the development team should be aware of that. It happened several times when listening to a playlist/album/artist. This Math.round() solution only works because I divided the position / duration by 1000 to get the value in seconds.

 

I'm sure developers would like to have more information about each track that is being played (and not have only the duration to detect a track change), because this means that my solution won't detect track changes when 2 songs with the exactly same duration in milliseconds/seconds are side by side in the playlist.

 

Hope it helps you go through this minor problem!

Reply
0 Replies

Suggested posts