Skip to content

Preloading 300 audio files - experiment crashes for participants #739

Answered by becky-gilbert
LangDevLab asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, I meant adding square brackets around your audio file(s) in the preload function, like this:

jsPsych.pluginAPI.preloadAudioFiles([jsPsych.timelineVariable('stimulus', true)], function () {
    done({ preload: "success" });
})

The reason I'm suggesting this is that the docs for the preloadAudioFiles function say that the first argument should be an array, whereas your stimulus variable is a string. Also, I can see from your console errors that jsPsych is trying to load a set of files, where each file is a letter from your stimulus path ('s, 'h', 'a', etc.). This suggests to me that you've given the preload function a string, and the function is trying to treat that string as an arra…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@LangDevLab
Comment options

@jodeleeuw
Comment options

@LangDevLab
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jodeleeuw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants