showMessage

Builds a trial with a onscreen message, optional buttons and optional photodiode box
Source:
Parameters:
Name Type Description
config Object The configuration object for USE_PHOTODIODE, USE_EEG, USE_ELECTRON and USE_MTURK flags.
Name Type Description
USE_PHOTODIODE boolean USE_PHOTODIODE flag
USE_EEG boolean USE_EEG flag
USE_ELECTRON boolean USE_ELECTRON flag
USE_MTURK boolean USE_MTURK flag
options Object
Name Type Description
responseType string This tells jsPsych which plugin file to use to run the trial. (default: htmlKeyboardResponse from "@jspsych/plugin-html-keyboard-response")
duration number trial duration in milliseconds, only to be specified if the options.responseType is htmlKeyboardResponse. (default: 1000, if options.responseType is htmlKeyboardResponse, otherwise ignored)
stimulus string Onscreen stimulus in HTML to be shown in the trial, if not set default text is empty. If the stimulus is not provided, message should be provided as a string. (default: "")
message string Onscreen message to be shown in the trial. (default: "")
onstart boolean True if the message is to be display on start of the trial. False if the message needs to be in the stimulus.(default: false)
responseEndsTrial boolean True if the trial ends on response,false if the trial waits for the duration. (default: false)
taskCode number Task code to be saved into data log (default: 1)
numBlinks number Number of times the pulse needs to be repeated for photodiode box, when USE_PHOTODIODE is set true. (default: 1)
buttons Array This array contains the keys that the subject is allowed to press in order to respond to the stimulus. Keys can be specified as their numeric key code or as characters (e.g., 'a', 'q'). The default value of "ALL_KEYS" means that all keys will be accepted as valid responses. Specifying "NO_KEYS" will mean that no responses are allowed. Only to be specified if the options.responseType is htmlButtonResponse from "@jspsych/plugin-html-button-response" (default: ["OK"], if options.responseType is htmlButtonResponse, otherwise ignored)