-
-
Notifications
You must be signed in to change notification settings - Fork 426
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
Active song index is wrong after shuffle. #318
Comments
@enemyss So the way the active index works is it either references the songs array if shuffle is not on or the shuffle array if shuffle is on. I'm pushing an update in 4.2 where you can get the active song metadata and it will return the index of the song in the songs array or if you are in a playlist the index of the song in the playlist no matter if shuffle is on or not. |
@danpastori I'm still confused, it means that it is working as it should? The main issue with this I have is that when switching to next song the DOM element is incorrect for song playing because it just takes next song in array instead of shuffled song, this seems incorrect or am I missing something? |
@danpastori Tried that, but now it returns NaN on Amplitude.getActiveIndex() and DOM element sync still takes next song in list after pressing on 'amplitude-next'. It returns active song metadata correct though.. |
This was fixed in v5.0.1 |
Still broken in v5.0.3 - https://521dimensions.com/open-source/amplitudejs/docs/examples/multiple-playlists.html |
Issue description
Updated from version 3.3.1 to 4. And shuffle mode and active song index is not working properly - when shuffle mode is enabled the "Amplitude.getActiveIndex()" doesn't return correct active song index. It was working good with 3.3.1.
Steps to reproduce the issue
What is expected?
Amplitude.getActiveIndex() should return the index of song which is playing, not the next song in array.
The text was updated successfully, but these errors were encountered: