-
A task has I managed to make a version where I preload everything and then pick videos. But this is computationally wasteful. I wrote a demo version for proof of concept. Here is the preload-pick-play part of my timeline:
The entire task is here. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @petyaracz, Since you've got var stim_list = [vid_cond1,vid_cond2];
var stimuli_num = jsPsych.randomization.shuffle([0,1])[0];
var vid_timeline = stim_list[stimuli_num];
var filenames = stim_list[stimuli_num].map((element) => element.video);
var preload = {
type: jsPsychPreload,
videos: filenames
}; |
Beta Was this translation helpful? Give feedback.
-
As a follow-up: I can loop through a randomly selected array like this:
I can't do this if I want to pick a single random video and add it as stimulus across different trials:
Results in jspsych printing I could do this but it's super clunky:
🙏 |
Beta Was this translation helpful? Give feedback.
Hi @petyaracz,
Since you've got
stimuli_num
as the condition andstim_list
as a list of all the videos in that condition you could just preload only those videos: