jsPsych version (e.g. 7.3.1): 7.3.4.
Currently, the jsPsych docs state that we should use the following code
var pavlovia_init = '{'
type: "pavlovia",
command: "init"
'}';
This didn’t work for me, because the pavlovia
type was not found. I looked at the plugin source jspsych-7-pavlovia-2022.1.1.js
and found that the plugin is called jsPsychPavlovia
.
So, the following code works for me:
const pavlovia_init = {
type: jsPsychPavlovia,
command: "init"
};
timeline.push(pavlovia_init);
I also removed the quotation marks around the curly braces.