mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-13 09:08:13 +00:00
36 lines
824 B
HTML
36 lines
824 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<script src="js/jquery.min.js"></script>
|
|
<script src="../jspsych.js"></script>
|
|
<script src="../plugins/jspsych-single-audio.js"></script>
|
|
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
|
</head>
|
|
<body>
|
|
<div id="jspsych-target"></div>
|
|
</body>
|
|
<script>
|
|
|
|
/*
|
|
this demo will only work if run online or with special permissions enable offline
|
|
for chrome, launch the browser from the command-line:
|
|
chrome --allow-file-access-from-files
|
|
*/
|
|
|
|
var block_1 = {
|
|
type: 'single-audio',
|
|
timeline: [
|
|
{stimulus: 'sound/sound.mp3'},
|
|
{stimulus: 'sound/hammer.mp3'}
|
|
]
|
|
}
|
|
|
|
jsPsych.init({
|
|
display_element: $('#jspsych-target'),
|
|
timeline: [block_1],
|
|
on_finish: function() {jsPsych.data.displayData();}
|
|
});
|
|
|
|
</script>
|
|
</html>
|