Autoplay eventually crashes survey


I know this is an old thread but I'm sharing what I hope is a useful update:

For non XML users, to include autoplay in an XLSform, you just add a column to your survey sheet called "autoplay" and on the row of the question you want to autoplay, type audio, or video if it's video, in that column.

However, this only works for a few questions, and causes the survey to eventually crash. It might work if you only have one or two questions with autoplay. Also, I've never gotten it to work for answer choices (maybe because I was doing autoplay on both questions and answer lists on the same screen). There are a couple threads about it on GitHub, but it seems to not have gone anywhere - or maybe they are still working on it. If anyone else needs this function, let the developers know! It's great for ACASI type surveys and low-literacy populations, and I'm sure a lot of projects would benefit from this.


1 Like

To be honest we were close to removing that option from select options because it's a bit problematic and we thought it's not used since sometimes it cause crashes but you have been the first user that report it.

I think it's a good time to decide what to do. We can remove the option or fix it. I know you would like to have that option fixed so please describe carefully how you imagine it.

It's not a problem if you have the autoplay option and just one question. The problem is if you have multiple questions on one screen and questions with select options which have audio files as well. Should we play all of them automatically?

It's a long-standing issue I've always wanted to fix so thanks for your post.

1 Like

Thanks for responding so quickly! I guess I should clarify what I was trying to do and maybe see what's possible. The survey only has one question per screen for the most part, and I do understand it would be complicated to have autoplay for a field-list group. The idea is to have autoplay play the question audio and then play the answer options for a select one or multiple. There are one or two integer questions in our survey, but they were grouped so I could include text that says "years old" after the blank space to make it a bit more intuitive. But that could be rearranged if the auto play only works on singe question screens.

To understand correctly, the survey crashed because I was trying to autoplay audio for grouped questions? And/or because I also have audio files for select_one answer choices? I also tried to include autoplay for the answer choices, maybe that was part of the problem as well (I added a column for autoplay in the choices sheet).

Does this make sense? Sorry if I'm muddling the issue. It sounds like if I didn't have audio files for answer choices and didn't have grouped questions it shouldn't crash. Unfortunately, we do need audio for the response options as well, preferably with autoplay.

I can't recall now so I would need to debug the project. I can do that if you really need to know.

I think a reasonable solution would be to automatically play question audio and then all audios from select items (if it's selectOne/selectMultiple question).
If it's a field-list group we should try to do the same but just for the first question.

What do you think?
@LN @yanokwa any thoughts?

Thanks for sharing your usecase, @marichaf! Please share your XLSForm if you can or a fake form with the structure you would like. That would help make sure we identify the existing problems and can design a solution that matches your need.

That sounds right to me. The challenge has been to keep the UI and audio player in sync so we just have to come up with a reasonable architecture there.

I'd like to at least explore what it would take to queue all audio on the screen up for automatic playback.

Thanks to you both. I've attached an example form that uses the same structure I was trying to accomplish. This includes the different types of questions included in our survey, and an example of the field-list groups I use but could restructure into one label if autoplay would only work on the first question in a list. Both the survey sheet and choices sheet have audio files, so we need audio for questions and their respective answer choices.

If it's possible to queue all the audio, questions and answer choices, in a field-list group, that would be interesting. From a practical standpoint, at least for the survey I'm working on, I don't think it makes sense for a long list of multiple choice questions because the respondent would need to be able to answer each question at their own pace, maybe re-playing the answer choices manually, interrupting the autoplay. However, it might make sense in my example where we have a note and then a separate integer/date or other type of question with its own label and separate audio file for each, so it would be great if that's possible.

Just out of curiosity, can you add audio files for hints, and would that be autoplayable as well?

@Grzesiek2010, no need to debug to find out precisely why my survey was crashing; as long as eventually I can get it to do what I need it to, that's great.
sample_colors.xlsx (15.8 KB)


Hey @marichaf! I've been working on fixing some of the issues for audio and autoplay. Thanks so much for providing context on what kinds of forms you're trying to put together and the example form itself. In terms of the forms you're looking to put together it sounds like you need the folowing features:

  • An audio file can be attached to a question and be played/stopped
  • An audio file can be attached to a choice in a select one/multiple and be played/stopped
  • Audio on a question will play automatically when a user swipes to a page if the question has audio in the autoplay column
  • If the question is a select with audio files attached to the choices they will play in order (after the question) when the question has audio in the autoplay column
  • Question and selection choice text will be highlighted when their audio file is playing

And it sounds like these features might be interesting but not something you need:

  • If a page is a field-list group the audio file for each question is played in order if the group has audio in its autoplay column
  • An audio file can be attached to a question hint and be played/stopped
  • Hint audio can also be set to autoplay

Let me know if any of those are in the wrong "section" (need vs interesting) or if any are just plain wrong. Also, would be interesting to know if there are any pieces of functionalities you've discovered you could use since the last time you posted.