| Reference | Downloads | Github

Webcam based eyetracking with psychopy!

URL of experiment:

Description of the problem:
Hi, I am trying to set up an online attention experiment that requires a basic fixation break feature. So I want to use the webcam to set up eyetracking and monitor fixation during the trial. I am not sure if the resolution of webcam eyetracking would be worse for these purposes but it would be worth while to know how to set up a webcam based eyetracking with psychopy and to know if it will be compatible with pavlovia.
Any pointers would be of great help!

1 Like

That’s unfortunately not currently something PsychoPy or Pavlovia can do, I’m afraid. Gorilla ( was supposed to have this functionality, but the documentation seems to be missing so I’m dubious. At this point if you wanted to do webcam based eye-tracking you would probably just have to program most of it from scratch.

Thanks Jonathan, for getting back promptly. Is there any other simpler way to monitor fixation for online experiments? Do you think recording the video of the participant during a ‘sensitive epoch’ and post hoc analyzing the video would work? Also, how can one download psychopy.iohub library?
Thanks again.

iohub wouldn’t work over Pavlovia, I’m afraid. While PsychoPy presents itself as one program, in reality the code that runs on your own local computer in Python is almost completely different from the JavaScript that runs over pavlovia.

Thanks Jonathan.

Do you plan to support eyetracking in psychojs? @jon

Hi all,

PsychoJS supports eye tracking via the webgazer library. See this thread for more information, including a link to a experiment you can clone and adapt to your needs: Eye-tracking development for Pavlovia

Best, Thomas


Hello. The webgazer implementation is fantastic, thank you so much for sharing and documenting it so well. I was wondering if it would be possible to also store the video via Pavlovia. Thank you!

Best, Ana

1 Like