Hello,
my survey asks participants to listen to 60 audio stimuli (each 10 seconds long; presented in a randomized order) and to rate them. A small percent of participants (~7 out 200; the actual number could be much higher but these were the ones kind enough to report) reported that they didn't hear many of the stimuli, often in an alternating fashion (i.e., every second stimuli did not play). Several of the participants reported using Chrome, so the browser does not seem to be the problem.
I am guessing this is related to poor internet connection, and that the stimuli were not loading properly, but it is difficult to know for sure.
A few examples on this page: https://www.soscisurvey.de/help/doku.php/en:create:media, show html code with both autoplay and preload = 'auto'.
However, here https://www.w3schools.com/tags/att_audio_preload.asp it says that 'The preload attribute is ignored if autoplay is present.' therefore I didn't include the preload attribute. But maybe this is why some participants had issues? Do you have other suggestions why I might be having such an issue? In debug mode, I also get this warning: 'You are storing data (%blocks%) with more than 2 KB in the interview case. Please consider using the show() command instead of replace() for large placeholders.' Maybe this is related?
In other survey platforms, there is the possibility to preload all the stimuli before the survey starts (or while the participant fills in the consent form, reads instructions etc.) but I couldn't find a why to do this with soscisurvey. Is that possible?
I apologize, this is many questions at once... Thanks in advance!
Here's the code I'm using to shuffle and autoplay the stimuli which are all uploaded to the host server and are 407 KB each:
if (!isset($blocks)) {
// Define question/audio pairs
$blocks = [
['WM01', 'DS_102_0.051.mp3', 'DS_102_0.051.ogg'],
['WM02', 'DS_104_0.057.mp3', 'DS_104_0.057.ogg'],
['WM03', 'DS_112_0.064.mp3', 'DS_112_0.064.ogg'],
['WM04', 'DS_114_0.062.mp3', 'DS_114_0.062.ogg'],
['WM05', 'DS_120_0.067.mp3', 'DS_120_0.067.ogg'],
// truncated for display
];
// Shuffle order
shuffle($blocks);
// Register for later pages
registerVariable($blocks);
}
// Which item on this page
$i = loopPage(count($blocks));
// Store which audio was played
$id = id('IV01', $i + 1);
// Save the value from the array here
put($id, $blocks[$i][1]);
// Output raw HTML (audio player)
html('<audio controls autoplay style="position: absolute; left: -9999px; top: -9999px">
<source src="' . $blocks[$i][1] . '" type="audio/mpeg">
<source src="' . $blocks[$i][2] . '" type="audio/ogg">
Your browser does not support the audio element.
</audio>');
// Show the question
question($blocks[$i][0]);