WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#28428 closed defect (bug) (fixed)

Incorrect highlighting of current track in audio player playlist

Reported by: quakerattled Owned by: wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9.1
Component: Media Keywords: needs-patch
Focuses: javascript Cc:

Description

The audio player playlist does not highlight the correct song when it returns to the first song in the list. When it loops back to the first song, the last song remains highlighted. When the second song starts, the highlighting catches up and skips to the second song.

To replicate this problem:

  • Upload 3 or more songs to the Media Library
  • Create a new post -> Add Media -> Create Audio Playlist
  • Add 3 or more songs to the playlist then "Insert audio playlist"
  • Click publish
  • Play the playlist to the end and let it loop back to the start

The problem occurs regardless of where you start in the playlist. I've tried it with the Twenty Twelve, Twenty Fourteen and Sorbet themes and can replicate it in all of them.

Change History (2)

#1 @wonderboymusic
6 years ago

  • Focuses javascript added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.0

#2 @wonderboymusic
6 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 28649:

In WPPlaylistView::ended(), at the end of a playlist, set the index to 0 and call ->setCurrent() instead of ->loadCurrent() so that the first track is properly highlighted.

Fixes #28428.

Note: See TracTickets for help on using tickets.