add preload trial

This commit is contained in:
Becky Gilbert 2021-02-17 11:10:34 -08:00
parent e0f6f5d0dc
commit 95099d1a46
3 changed files with 20 additions and 2 deletions

View File

@ -4,6 +4,7 @@
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-audio-button-response.js"></script>
<script src="../plugins/jspsych-html-button-response.js"></script>
<script src="../plugins/jspsych-preload.js"></script>
<link rel="stylesheet" href="../css/jspsych.css">
</head>
<body></body>
@ -11,6 +12,11 @@
var timeline = [];
timeline.push({
type: 'preload',
auto_preload: true
});
timeline.push({
type: 'html-button-response',
stimulus: '<div style="max-width:600px;"><p>Some browsers now require the user to interact with a page before it can play audio. '+

View File

@ -4,11 +4,17 @@
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-audio-keyboard-response.js"></script>
<script src="../plugins/jspsych-html-button-response.js"></script>
<script src="../plugins/jspsych-preload.js"></script>
<link rel="stylesheet" href="../css/jspsych.css">
</head>
<body></body>
<script>
var preload = {
type: 'preload',
auto_preload: true
}
var pre_audio = {
type: 'html-button-response',
stimulus: '<div style="max-width:600px;"><p>Some browsers now require the user to interact with a page before it can play audio. '+
@ -51,7 +57,7 @@
}
jsPsych.init({
timeline: [pre_audio, trial_1, trial_2, trial_3, trial_4],
timeline: [preload, pre_audio, trial_1, trial_2, trial_3, trial_4],
on_finish: function() {
jsPsych.data.displayData();
},

View File

@ -4,11 +4,17 @@
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-audio-slider-response.js"></script>
<script src="../plugins/jspsych-html-button-response.js"></script>
<script src="../plugins/jspsych-preload.js"></script>
<link rel="stylesheet" href="../css/jspsych.css">
</head>
<body></body>
<script>
var preload = {
type: 'preload',
auto_preload: true
}
var pre_audio = {
type: 'html-button-response',
stimulus: '<div style="max-width:600px;"><p>Some browsers now require the user to interact with a page before it can play audio. '+
@ -44,7 +50,7 @@
}
jsPsych.init({
timeline: [pre_audio, trial_1, trial_2, trial_3],
timeline: [preload, pre_audio, trial_1, trial_2, trial_3],
on_finish: function() {
jsPsych.data.displayData();
},