URL of experiment: https://gitlab.pavlovia.org/jdunkle/socialconnection_resource
Description of the problem:
I have an experiment with a set of many possible video and image resources, and we are trying to use CSV files to specify which set of trials to load for a given user.
I have written code that will use the experiment setting dialogue box to select the correct CSV and read it as a resource list (an array of JS objects with “name” and “path” fields) at the beginning of the experiment.
The first routine in the experiment is a loading screen, an in the code module, at the “Begin Routine” stage, I pass this resource list into the function psychoJS.downloadResources().
This works, the resources are loaded, it takes about 1-2 minutes. However, during this time, the experiment continues, and if it reaches a trial where it needs a resource that isn’t yet loaded it will crash. In order for the experiment to work, I need the loading screen to stay up until all the resources have been downloaded.
In the Pavlovia documentation, it states that a call to this function is blocking, so the experiment should pause until it is finished. It doesn’t seem to be doing that.
Is there some step that I’m missing?
Thanks for any help!