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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -