javascript - How shuffle a file (which contains an array) before using it? -



javascript - How shuffle a file (which contains an array) before using it? -

i using std mp3 player in webpage. javascript function includes next line:

<param name="flashvars" value="playlist=http://..../mp3_playlist.txt" />

the file contains array of mp3 file names (separated new lines).

i want shuffle playlist changes each time it's visited.

so added shuffle function:

var plist = new array(); $.get('http://..../mp3_playlist.txt', function(data){ plist = data.split(/\r\n|\r|\n/); plist = shuffle(plist); });

what syntax should utilize insert array ref function instead of file name? help.

javascript arrays

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -