Skip to content

Multiple playlists on a page: can't go to next or previous song until the play/pause button is clicked. #516

@eltiffster

Description

@eltiffster

Issue Description

When first loading a page with multiple playlists, clicking the playlist next or playlist previous button does nothing at first. However, if you press the play button on any player, this will unfreeze the playlist next and playlist previous buttons. After that, the buttons work as expected for the player that was clicked.

This doesn't seem to affect pages with only one playlist on the page.

Expected Behavior

Clicking the playlist next button should skip to the next song whether the player is playing or not. Clicking the playlist previous button should skip to the previous song whether the player is playing or not.

Steps To Reproduce

The "Multiple Playlists" Codepen has this bug.

  1. Go to the codepen link.
  2. Click the next or previous button on either player. Nothing happens.
  3. Click play/pause. Then click the next or previous button again. The buttons now work as expected.

This does not happen with the Blue Playlist or Flat Black Playlist example, so I believe this issue is limited to pages with multiple playlists.

AmplitudeJS Version

5.3.2

Browser Information

Tested on Chrome v. 103 and Firefox v. 91

Link To Where Your Issue Can Be Reproduced

https://codepen.io/serversideup/pen/JVYXBe

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: Needs Confirmation 🧐Bugs that are reported, but needs to be confirmed and replicated.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions