Best answer by JeremyK
View originalAdding hidden audio using javascript
I have an audio file that I want to automatically play when a page Is loaded rather than the participants having to click on the audio file, is this feasible with JavaScript? As it is essential for my project.
I'm not sure how you get the audio file 'uploaded' (where it's stored, how you call it, etc.), but I know there's an html property called _audio autoplay_ that will probably be useful to you.
https://w3schools.com/jsref/prop_audio_autoplay.asp
Example SO article: https://stackoverflow.com/questions/43710173/upload-and-play-audio-file-js?rq=1
Hope this gives you a nudge in the right direction!
https://w3schools.com/jsref/prop_audio_autoplay.asp
Example SO article: https://stackoverflow.com/questions/43710173/upload-and-play-audio-file-js?rq=1
Hope this gives you a nudge in the right direction!
Leave a Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.