Search code examples
javascriptjqueryajaxjplayer

how to make jplayer play the same song after refresh?


I am making jPlayer function on Ajax so that if page of my website refreshed, jPlayer should continue with it's current song and so on. I am able to store the information of tracks and current tracks on refresh but unable to run it on jPlayer though it is running from start.


Solution

  • You can provide the index number to play the track.

    eg. myPlaylist.play(parseInt(cur_track_data));

    also add this to playlistOption { autoPlay:true }