How do I get an MP3 file to autoplay in Qualtrics? | XM Community
Skip to main content
Hi,



Upon searching this question, I found many different forms of code which could be used to make this work. However, upon trying all of the basic ones, none of them worked. I then found that I could embed an audio recording from SoundCloud, which should allow me to hide any visuals of the recording whilst allowing it to autoplay.

This is the code that I used:

<iframe allow="autoplay" frameborder="no" height="300" scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/701519164%3Fsecret_token%3Ds-dd1Lv&color=%23ff5500&autoplay=true&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true" width="100%"></iframe>



This partially works. It allows the recording to play, but the user has to press a play button to make it work, alongside there being a very large, very orange SoundCloud logo at the top of each page I have put a recording on.

I then changed the code slightly so it looked like this:

<iframe allow="autoplay" frameborder="no" height="0" scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/701519164%3Fsecret_token%3Ds-dd1Lv&color=%23ff5500&autoplay=true&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true" width="0%"></iframe>



This got rid of the large orange logo, but appeared to delete the recording in the process.



Is there any other way of getting an MP3 recording to autoplay in Qualtrics or has this function been removed?





Thanks in advance.
Hi there @erinh,



I have a solution for you (though I can't see the code you put in). You probably need to wrap it in back ticks.



Basically - I uploaded an MP3 file to a library and then loaded into the survey using the rich content editor and the insert media function. Once this was done, I went into the HTML view and added the autoplay attribute in the HTML view code:

```

<audio class="qmedia" controls="true" height="40" preload="auto" width="320" autoplay=true><source src="https://iu.co1.qualtrics.com/CP/File.php?F=F_0Pq5AA183OeVmAJ" type="audio/mp3" /><embed class="qmedia" flashvars="file=https://iu.co1.qualtrics.com/CP/File.php?F=F_0Pq5AA183OeVmAJ&width=320&height=20&type=mp3&autostart=false" height="20" pluginspage="http://adobe.com/flashplayer/" src="/WRQualtricsShared/Flash/flvplayer.swf" type="application/x-shockwave-flash" width="320" wmode="transparent"></embed></audio>

</audio>

```



The key part was adding `autoplay=true` to the end of the `<audio>` section to add the autoplay attribute.



Please note that in preview mode -it'll play twice, because you get a mobile version and a desktop version.



If this works for you please mark this as the accepted answer 🙂

Leave a Reply