URL of experiment: onlineRecognitionExperiment [PsychoPy]
Description of the problem:
I’m having issues with playing audio inside a loop online. Similar issues have been discussed in other posts such as: Audio loop not working online. However, the solutions provided in this as well as other discussions/posts have not worked for me, at least fully.
First, I tried to change the starting point of the sounds to be something other than 0. This didn’t work, so I tried the other solution provided in the previous link (stim1_2.setValue(440); stim1_2.setValue(fname);). Adding this code made most of the sounds work correctly, but still didn’t fix the issue for all sounds. I was originally working with wav-files but switched to mp3 in case that would help. Unfortunately, that did not change anything either.
I added a print-statement to the code so that I could check whether all sounds are defined correctly. Even for the sounds that don’t play, the name of the sound file is always correctly printed. I also don’t get any errors on the console when running the experiment. In addition to this, the sounds that don’t play change depending on the browser I’m using and are not necessarily even consistent in one browser (for example, one sound may work once but then not the second time while still using the same browser). Surprisingly enough, Safari is the only browser that plays all sounds correctly. Google Chrome and Firefox do not work properly. I am working on a Mac so I don’t know if that is in some way related.
I will happily share my code if requested, but would rather not make it publicly available to everyone at this point (as I’m not sure whether I’m even allowed to do that…). I’ve been struggling with these sound problems for quite a while and would appreciate any advice you might have!