I have a routine that presents an image and some audio. The participant presses “1” for yes, “0” for no, or “space” to repeat the audio. I’ve done this in the desktop version by using a code component with the following code at the end of the routine.
if key_resp_2.keys == '1' or key_resp_2.keys == '0':
trial_repeat.finished = True
Everything works fine in the desktop version, but in the javascript version of the experiment run in my browser nothing happens when I press space. There are no errors in the JS console either.
Ok I found the issue. It seems like a bug with PsychoJS. The audio only repeats when the audio component starts with a small delay. I’ve attached a small experiment to highlight the issue. TestExp.zip (5.2 MB)