jsPsych/plugins/jspsych-preload.js
2021-01-06 18:54:28 -05:00

56 lines
1.1 KiB
JavaScript

/**
* jspsych-preload
* documentation: docs.jspsych.org
*
**/
jsPsych.plugins['preload'] = (function() {
var plugin = {};
plugin.info = {
name: 'preload',
description: '',
parameters: {
auto_preload: {
type: jsPsych.plugins.parameterType.BOOL,
default: false
},
images: {
type: jsPsych.plugins.parameterType.STRING,
default: []
},
audio: {
type: jsPsych.plugins.parameterType.STRING,
default: []
},
video: {
type: jsPsych.plugins.parameterType.STRING,
default: []
},
show_progress_bar: {
type: jsPsych.plugins.parameterType.BOOL,
default: true,
},
show_detailed_errors: {
type: jsPsych.plugins.parameterType.BOOL,
default: false
},
}
}
plugin.trial = function(display_element, trial) {
function end_trial(){
var trial_data = {
value: return_val
};
jsPsych.finishTrial(trial_data);
}
};
return plugin;
})();