Autoplay Audio Files Using Loop and Merge | XM Community
Skip to main content
Solved

Autoplay Audio Files Using Loop and Merge


Hello,
I am running an experiment where I need audio files to autoplay without a participant being able to fast forward, rewind, pause, etc. (I.e., autoplay, autostart, no controls). This files need to be randomized, so I am using the loop and merge function. Here is the code I am using:




This code does not work - the audio files will randomly appear, but I am able to pause/play, move around the progress bar, and they do not start playing automatically.
My colleague has used the below code for her video files, which autoplays the videos without the participant being able to manipulate them.





When I try and adapt it for audio files, it still doesn't work.
 





I could really use some help. Thanks in advance!

Best answer by sreisma1

Thank you! the pointer events disable command helped. The above did not autoplay, however when I added

autoplay = "true"
it worked perfectly. Thanks!
Final below for those curious:

    

        
            
            

                

            

        
    



View original

2 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2028 replies
  • April 15, 2021

Try this:


    

        
            
            

                

            

        
    



You can delete
controls="true"
to remove the controls from the display, however, since its an audio file, you won't see anyhting. That's why add
pointer-events:none
to disable clicks.


  • Author
  • 1 reply
  • Answer
  • April 15, 2021

Thank you! the pointer events disable command helped. The above did not autoplay, however when I added

autoplay = "true"
it worked perfectly. Thanks!
Final below for those curious: