Hi, I am now running into a related problem.
When wanting to run this experiment online, I receive the error message ReferenceError: sound is not defined
Within the code component I selected ‘both’ and I thought this would take care of translating my code to JS for online use. Is there a steo that I am missing?
Thank you.
The code reads as follows:
//Begin experiment
JS: background_sound = new sound.Sound(“traffic.wav”);
Py: background_sound = sound.Sound(‘traffic.wav’)
//Begin routine
JS:
if ((practiceTrials.thisN === 0)) {
background_sound.play();
}
Py:
if practiceTrials.thisN == 0:
background_sound.play()