psychopy.org | Reference | Downloads | Github

Prevent going forward until all resources have been manually loaded

During the instructions page for an experiment, I am manually loading around 100 selected images for each participant using: psychoJS.downloadResources(participant_assigned_images)

I can’t do this at the start of the experiment because each participant gets entirely different images that I determine based on their participant ID. I think for participants with slower wi-fi this takes longer than the 15 seconds they get during the instructions page and it causes the experiment to break as it can’t find the resource (downloading resources didn’t finish).

Is there a way that I can make participants unable to proceed until the resources are fully downloaded? (i.e. not show the “press space bar to continue” text component and keypress until resources have been downloaded) Thank you!

Maybe something like this could help you out? Streamlining downloading resources - #2 by thomas_pronk

Note I used a similar approach in downloading a JS file in demo_eyetracking2: Thomas Pronk / demo_eye_tracking2 · GitLab

They don’t need all 100 images at once, so could you make sure that they download in the order they’re needed? I recently had some success with this method (making sure practice images downloaded before main trial images).