AmplitudeJS Repeat and Shuffle not working

I am using Amplitude in Wordpress. Creating dynamic playlists based on user selections. I’m able to play, pause, skip forward and back, but Repeat and Shuffle do not work as expected. Shuffle seems to kind of work but it will play the same song twice sometimes and not play every song in the list. Repeat doesn’t work at all. I’d like it to repeat the whole playlist but it just stops when it gets to the final song. When either button is clicked, it does change the state/class to on or off.

I’m enqueueing the CDN link for version 5.2.0 in Wordpress.

My html looks like:


Any help would be greatly appreciated.

Thank you

Hey @matteoc5, thanks for swinging by!

Any reason to not use the latest version (v5.3.1)? We made some significant improvements in v5.3.0 that may fix this.

Here is the CDN page for it: https://cdn.jsdelivr.net/npm/amplitudejs/

Not sure about the dynamic part, but I just listened to our AmplitudeJS playlist on our website for hours the other day and everything worked great!

Well I tried at one point and was having issues with that. Works perfectly with 5.2 but when I upgrade to 5.3 I get an error in the console saying:

Uncaught TypeError: Cannot set property ‘active_index’ of undefined

maybe you can help me with that? haven’t been able to figure out the reason for that. I’m dynamically creating playlist based on what the current user has saved in the DB. So when page loads it grabs the playlist with songs for that user. I’m console logging the playlists and everything looks good there, all the playlists and songs are showing.

If you think you found a bug, it might be best to open an issue on Github.

Filling out the entire bug template and giving us a link to where we can replicate your issue will help us out greatly!

Here is where you can open a bug: https://github.com/serversideup/amplitudejs/issues/new?assignees=&labels=Bug%3A+Needs+Confirmation+%F0%9F%A7%90&template=bug_report.md&title=