Play random sounds without repeat - HELP 2018

0

I WANT TO RANDOMIZE THIS CODE: WE HAVE TO IMPROVE IT. 1- I NEED TO APPEAR THE NORMAL AUDIO PLAYER, AS A PICTURE APPEARS. 2- WHEN FINISHING A SONG DOES NOT CONTINUE WITH THE FOLLOWING. The code that makes the random is fine, you just have to improve the two previous aspects.

HELP - HELP !!!

   

var sounds = ["001.mp3",               "002.mp3",               "003.mp3",               "004.mp3",               "005.mp3"],     oldSounds = []; var playSounds = function () {     var index = Math.floor (Math.random () * (sounds.length)),         thisSound = sounds [index];         oldSounds.push (thisSound);         sounds.splice (index, 1);         if (sounds.length "); }     
asked by EMPTY SIETE 20.04.2018 в 04:33
source

0 answers