I currently have this js code:
audio.src = path + 'assets/music/'+(Math.floor(Math.random() * songs) + 1)+'.mp3'
And on my website, I have folder assets/music/1.mp3, 2.mp3, 3.mp3, so it picks a random song and it plays the song. (Math.random)
I prefer not to use math.random because sometimes it plays the same track twice and it's annoying.
So any solutions?
Website: http://selen.xyz The javascript code: http://selen.xyz/animate.js