In order to have the waveform drawn, the first track/song has to be downloaded but when the first track/song is clicked, it tries to re-download the file. A new connection is started, the download will not happen because the file is loaded from cache but the waveform will be redrawn which is a bit confusing.
On a slow connection and with a medium/low-end device is more noticeable.

This behavior is not present when the play button is pushed (the song is playing immediately and the waveform doesn't have to be refreshed/redrawn).

Thank you!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gge created an issue. See original summary.

Daniel.Moberly’s picture

Title: wavesurfer.js - imitate play button behavior when clicking the first track of a playlist » wavesurfer.js - imitate play button behavior when clicking already loaded tracks in playlist
Status: Active » Needs review
FileSize
1.53 KB

Changing title slightly as this actually applies for other tracks as well (don't need to re-load them if they're already loaded).

Attaching a patch for testing.

gge’s picture

Status: Needs review » Reviewed & tested by the community

Wow that was a really fast fix! :) It works great now! Thank you very much!

  • Daniel.Moberly committed d42fa9e on 8.x-1.x
    Issue #2940718 by Daniel.Moberly: wavesurfer.js - imitate play button...
Daniel.Moberly’s picture

Status: Reviewed & tested by the community » Fixed

I try my best! Thanks for reporting the issue!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.