mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
add preload trial
This commit is contained in:
parent
e0f6f5d0dc
commit
95099d1a46
@ -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. '+
|
||||
|
@ -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();
|
||||
},
|
||||
|
@ -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();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user