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 = {
|
var block_1 = {
|
||||||
type: 'single-audio',
|
type: 'single-audio',
|
||||||
timeline: [
|
timeline: [
|
||||||
{stimulus: 'sound/sound.mp3'},
|
{stimulus: function() { return 'sound/sound.mp3'; }},
|
||||||
{stimulus: 'sound/hammer.mp3'}
|
{stimulus: 'sound/hammer.mp3'}
|
||||||
],
|
],
|
||||||
prompt: 'press any key to advance'
|
prompt: 'press any key to advance'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jsPsych.pluginAPI.preloadAudioFiles(['sound/sound.mp3'], start);
|
||||||
|
|
||||||
|
function start(){
|
||||||
jsPsych.init({
|
jsPsych.init({
|
||||||
timeline: [block_1],
|
timeline: [block_1],
|
||||||
on_finish: function() {jsPsych.data.displayData();}
|
on_finish: function() {jsPsych.data.displayData();}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user