unable to load/use audio files dynamically during experiment #2145
-
Hi, short version: longer version: I tried a lot of things. All works when I do things statically, i.e., pre-define the threshold and the 100 audio files before everything starts. But the dynamic threshold and use of the 100 files does not work. Audio files are undefined then, although all variables are in place when I check using on_start. I assume that using the function with on_start gets run later, while stimulus assignment (not being a function) is run initially when audio files are still undefined. Is there any solution to dynamic use/load of audio files based on the experiment? Bjorn |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @bjornherrmann, If you are using jsPsych 6.3.0+ then you could use the preload plugin. You can pass a function as the parameter for |
Beta Was this translation helpful? Give feedback.
Hi @bjornherrmann,
If you are using jsPsych 6.3.0+ then you could use the preload plugin. You can pass a function as the parameter for
audio
to select the subset of audio you want to load at that moment.