mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 08:38:11 +00:00
adjust single-audio test to include function call.
This commit is contained in:
parent
fd458fec74
commit
94e06aa33d
@ -18,16 +18,20 @@
|
||||
var block_1 = {
|
||||
type: 'single-audio',
|
||||
timeline: [
|
||||
{stimulus: 'sound/sound.mp3'},
|
||||
{stimulus: function() { return 'sound/sound.mp3'; }},
|
||||
{stimulus: 'sound/hammer.mp3'}
|
||||
],
|
||||
prompt: 'press any key to advance'
|
||||
}
|
||||
|
||||
jsPsych.init({
|
||||
timeline: [block_1],
|
||||
on_finish: function() {jsPsych.data.displayData();}
|
||||
});
|
||||
jsPsych.pluginAPI.preloadAudioFiles(['sound/sound.mp3'], start);
|
||||
|
||||
function start(){
|
||||
jsPsych.init({
|
||||
timeline: [block_1],
|
||||
on_finish: function() {jsPsych.data.displayData();}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user