Loading audios
#3020
Replies: 1 comment 1 reply
-
Does your preload function give an error? If that is not the case then the problem is with how you define the audio stimulus. Can you try to create a trial with a single audio file: var ap_primes_block1 = { |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm getting the error: Failed to load audio file "[stimulus name]". Try checking the file path. We recommend using the preload plugin to load audio files. There is no problem with the file path nor file names, so I'm perplexed with regards to what the issue could be.
I'm defining my audios as such:
var ap_primes_block1 = {
type: jsPsychAudioKeyboardResponse,
stimulus: [
{ ap_block1_prime: '[name]' },
{ ap_block1_prime: '[name]' },
{ ap_block1_prime: '[name]' },
{ ap_block1_prime: '[name]' }
]
};
I've tried two ways (no idea what preload plugin really refers to), and both return the same error:
1)
var audio = [
'[name]',
'[name]',
'[name]',
'[name]'
];
var preload = {
type: jsPsychPreload,
audio: audio,
}
jsPsych.run([preload, ap_primes_block1]);
var timeline_preload = [
ap_primes_block1
];
jsPsych.pluginAPI.getAutoPreloadList(timeline_preload);
It looks like I get the same error even without using preload, so it might not be an issue with how I preloaded. Any help would be appreciated!
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions