code: function(index) {
          links[currentTrack].classList.remove('active');
          currentTrack = index;
          links[currentTrack].classList.add('active');
          wavesurfer.load(links[currentTrack].href);
      }
docs: Load a track by index and highlight the corresponding link