Update eye-tracking-with-webgazer.html

page demos/eye-tracking-with-webgazer broken
Uncaught ReferenceError: jsPsychHtmKeyboardResponse is not defined

refs:
- https://www.jspsych.org/7.0/demos/eye-tracking-with-webgazer.html
- https://www.jspsych.org/7.3/overview/eye-tracking/#example
This commit is contained in:
John Chiu 2023-10-13 02:44:08 +08:00 committed by GitHub
parent b78dcc6830
commit cc3b1a1230
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,7 +121,7 @@
} }
var begin = { var begin = {
type: jsPsychHtmKeyboardResponse, type: jsPsychHtmlKeyboardResponse,
stimulus: `<p>The next screen will show an image to demonstrate adding the webgazer extension to a trial.</p> stimulus: `<p>The next screen will show an image to demonstrate adding the webgazer extension to a trial.</p>
<p>Just look at the image while eye tracking data is collected. The trial will end automatically.</p> <p>Just look at the image while eye tracking data is collected. The trial will end automatically.</p>
<p>Press any key to start.</p> <p>Press any key to start.</p>
@ -142,7 +142,7 @@
} }
var show_data = { var show_data = {
type: jsPsychHtmKeyboardResponse, type: jsPsychHtmlKeyboardResponse,
stimulus: function() { stimulus: function() {
var trial_data = jsPsych.data.getLastTrialData().values(); var trial_data = jsPsych.data.getLastTrialData().values();
var trial_json = JSON.stringify(trial_data, null, 2); var trial_json = JSON.stringify(trial_data, null, 2);