Autoplay multiple audio files in randomized order | XM Community
Skip to main content

Hi all,
In one block, I have 4 text questions containing audio files. The audios appear on the same page in randomized order. By default, they are all displayed and respondents need to click the PLAY button for each audio file to start.
I would like respondents to see only 1 PLAY button. When pressed, respondents are supposed to hear all audios in succession (in their randomized order).
Do you have any ideas on how to do that? I am a newbie to custom code.

Thanks a lot in advance,
Janosch

Hi, I know this isn't quite what you're looking for (and I'm hoping someone here with mad javascript skills will have an answer - but I'm thinking needing to both autoplay AND delay playing of each audiofile, based on a randomized length of time, is going to make this extra challenging)...
So I'm wondering whether it would be possible for you to

  1. Put each file in its own block, with settings to autoplay on page load. Then -

  2. Also put a timing question that autoadvances that page/block after (length of the audio on that page) so that after it plays, the survey takes them to the next one. And then finally

  3. Put those blocks into a randomizer step in the Survey Flow, so that the order in which each audio files play is variable for each respondent. And finally.

  4. Consider changing the button label for the block immediately before the first one to say something like "Play Audio Now" so that this essentially acts as a single play button, without being one, exactly.


Or I guess you could create a series of audiofiles that each put all 4 versions together in random order, and then randomly present only ONE of the longer combined files.

Again I know that's not quite what you are hoping for and I am really hoping someone can give you the exact thing you need. But these are probably the workarounds we would use (because we don't JS almost anything in our surveys unless we absolutely cannot avoid it).


Thanks Carol!
I see this could work out but it would be extremely labor intensive and prone to error because what I presented as block with 4 questions, here, is only one of 16 vignettes that respondents get randomly assigned to. The randomized order is only a control.


Leave a Reply