need help getting some HTML code pull a mp3 from the folder its in and autoplay it. could really use the help as i’m not crazy savy with HTML
https://www.w3schools.com/html/html5_audio.asp
https://www.w3schools.com/tags/att_audio_autoplay.asp
From experience I don’t recommend you playing the music from your server. This will increase bandwidth quite a lot. (i.e. 20 songs × 3mb each is 60 mb used for just one resources). You would need:
- To store it, 60mb is maybe not a lot, but could be a concern when migrating.
- Users need to load every song when the resources loads (i.e. 60mb × 32 users = ~2GB of bandwidth).
@Syntasu so should I just leave it the way it is where it streams the video from the internet? instead of from a local folder.
I tried something like this for my HRC Resource and could only get it on a autoloop and never after a certain cmd was entered.
First of all my estimate is not really accurate. Since new clients only need to download the songs. Already prior coneected clients will cache the songs for later use.
What i’ve done with the loading screen i’ve made, I integrated the YouTube IFrame API.
You can find my implementation here, it gets the job done atleast:
https://github.com/Syntasu/synn-loadscreen/blob/master/js/music-handler.js