How would I go about, in an HTML webpage, having a random file in a specific directory be selected in a src? My intent is to have a randomized audio file autoplay whenever I open any webpage on my website (I know, autoplay audio is morally questionable, but its the behavior I want). I already have a working instance of the webpage playing a predesignated file. As I outlined, I want a different file each time which exists in the "audio/" directory to be played. I suspect javascript or java arrays are needed to make this possible, but I'm not versed enough as of now to implement or apply the as of now completely separate progresses in static html site building and struggling through java video courses character by character in Eclipse. I'm what my username suggests.
Here's the contents of the HTML file as it is, with the unrelated bits excised;
<html>
<title>Demos</title>
<a href="home.html" accesskey="`"></a>
<audio autoplay="true" src="audio/pcm001rip.mp3"> </audio>
<body bgcolor=#000000 text=#ffffff>
</body>
</html>