example/playlist/app.js
function(index) {
        links[currentTrack].classList.remove('active');
        currentTrack = index;
        links[currentTrack].classList.add('active');
        wavesurfer.load(links[currentTrack].href);
    }
function(index) {
        links[currentTrack].classList.remove('active');
        currentTrack = index;
        links[currentTrack].classList.add('active');
        wavesurfer.load(links[currentTrack].href);
    }
function ( index ) { links [ currentTrack ] . classList . remove ( 'active' ) ; currentTrack = index ; links [ currentTrack ] . classList . add ( 'active' ) ; wavesurfer . load ( links [ currentTrack ] . href ) ; }
Load a track by index and highlight the corresponding link
Load a track by index and highlight the corresponding link