Adding hidden audio using javascript | XM Community
Solved

Adding hidden audio using javascript

  • 22 January 2019
  • 3 replies
  • 110 views

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.
icon

Best answer by JeremyK 22 January 2019, 16:07

View original

3 replies

Userlevel 5
Badge +7
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!
Hello @JeremyK ,

Please see this post
Hi ive tried this and its not working, says theres an error? any help greatly appreciated as have a big dissertation questionnaire.
> @Shashi said:
> Hello @JeremyK ,
>
> Please see this post

Leave a Reply