jsPsych studies on CHS
jsPsych is an open source library for creating a wide range of behavioral experiments that run in a web browser. It consists of a core library and “plugins”. Plugins are the components that make up the experiment. Each plugin lets you define different kinds of events (e.g. presenting an image or text) and it collects different kinds of data (e.g. responses and response times). The jsPsych library also supports a wide range of features that are commonly used in behavioral experiments, like looping over sets of trials, randomizing, sampling, and conditional behavior.
To get a feel for how to build a jsPsych experiment, you can check out the jsPsych Hello World tutorial and RT task tutorial. We also have our own CHS jsPsych Hello World tutorial, which demonstrates the CHS-specific features (detailed in this section) that we’ve added for jsPsych studies running on the CHS platform.
To learn more about jsPsych features, some other great places to start are the jsPsych documentation about timelines and dynamic parameters.
jsPsych packages
The CHS jsPsych experiment runner automatically loads a set of packages from the standard jsPsych library for researchers to use. These are:
Core jsPsych library v8.0.3
HTML keyboard response plugin v2.0.0:
jsPsychHtmlKeyboardResponse
Image keyboard response plugin v2.0.0:
jsPsychImageKeyboardResponse
HTML button response plugin v2.0.0:
jsPsychHtmlButtonResponse
Image button response plugin v2.0.0:
jsPsychImageButtonResponse
Preload plugin v2.0.0:
jsPsychPreload
We will likely add more options in the future. If there are any specific jsPsych plugins/extensions that your experiment needs, please let us know! The best way to request access to a standard jsPsych package is by creating a lookit-api
Github issue, but you can also let us know on Slack.
Custom CHS jsPsych packages
In addition to the jsPsych packages listed above, the CHS jsPsych experiment runner also automatically loads some custom packages. These custom plugins/extensions were designed to “fill in the gaps” in the sort of functionality that CHS researchers typically need for child development studies. This functionality includes: standardized webcam/mic configuration steps, video-recorded consent, trial/session recording, and standardized exit surveys.
The CHS jsPsych documentation contains more information about all of the parameters available in the CHS jsPsych plugins/extensions listed below.
Do you need any types of trials (Lookit EFP “frames”) or features that are not listed here, and are not available through the standard jsPsych library? Let us know! The best way to request a custom (CHS-specific) jsPsych plugin/extension or feature is by creating a lookit-jspsych
Github issue, but you can also let us know on Slack.
Plugins
Video config plugin in the CHS Record package:
chsRecord.VideoConfigPlugin
Video consent plugin in the CHS Record package:
chsRecord.VideoConsentPlugin
Start session recording plugin in the CHS Record package:
chsRecord.StartRecordPlugin
Stop session recording plugin in the CHS Record package:
chsRecord.StopRecordPlugin
Consent survey plugin in the CHS Surveys package:
chsSurveys.ConsentSurveyPlugin
Exit survey plugin in the CHS Surveys package:
chsSurveys.ExitSurveyPlugin
Extensions
jsPsych extensions are packages that extend the functionality of a plugin.
Trial recording extension in the CHS Record package:
chsRecord.TrialRecordExtension
Translations
All of these plugins/extensions support the automatic translation of hard-coded text through a locale
parameter.