mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
29 lines
662 B
HTML
29 lines
662 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../packages/jspsych/dist/index.browser.js"></script>
|
|
<script src="../packages/plugin-initialize-microphone/dist/index.browser.js"></script>
|
|
<script src="../packages/plugin-html-audio-response/dist/index.browser.js"></script>
|
|
<link rel="stylesheet" href="../packages/jspsych/css/jspsych.css">
|
|
</head>
|
|
<body></body>
|
|
<script>
|
|
|
|
var jsPsych = initJsPsych();
|
|
|
|
let init_mic = {
|
|
type: jsPsychInitializeMicrophone,
|
|
}
|
|
|
|
let ar = {
|
|
type: jsPsychHtmlAudioResponse,
|
|
stimulus: '<p>Speak!</p>',
|
|
on_finish: (data) => {
|
|
console.log(data);
|
|
}
|
|
}
|
|
|
|
jsPsych.run([init_mic, ar]);
|
|
|
|
</script>
|
|
</html> |