@lookit/record 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,376 @@
1
+ # Record
2
+
3
+ This package contains the plugins and extensions to record audio and/or video of
4
+ either a single trial or multiple trials.
5
+
6
+ ## Video Configuration
7
+
8
+ To record _any_ video during an experiment, including a consent video, you must
9
+ add a video configuration trial. This trial allows the user to give permissions
10
+ and select the correct camera and microphone. This trial also does some basic
11
+ checks on the webcam and mic inputs, so that the participant can fix common
12
+ problems before the experiment starts.
13
+
14
+ Create a video configuration trial and put it in your experiment timeline prior
15
+ to any other trials that use the participant's webcam/microphone. The trial type
16
+ is `chsRecord.VideoConfigPlugin`.
17
+
18
+ ```javascript
19
+ const videoConfig = { type: chsRecord.VideoConfigPlugin };
20
+ ```
21
+
22
+ ### Parameters
23
+
24
+ **`troubleshooting_intro` [HTML String]**
25
+
26
+ Optional text to add at the start of the "Setup tips and troubleshooting"
27
+ section. This string allows HTML formatting (e.g. `<strong></strong>` for bold,
28
+ `<em></em>` for italics).
29
+
30
+ ### Examples
31
+
32
+ ```javascript
33
+ const videoConfig = {
34
+ type: chsRecord.VideoConfigPlugin,
35
+ troubleshooting_intro:
36
+ "If you're having any trouble getting your webcam set up, please feel free to call the XYZ lab at (123) 456-7890 and we'd be glad to help you out!",
37
+ };
38
+ ```
39
+
40
+ ## Trial Recording
41
+
42
+ To record a single trial, you will have to first load the extension in
43
+ `initJsPsych`.
44
+
45
+ ```javascript
46
+ const jsPsych = initJsPsych({
47
+ extensions: [{ type: chsRecord.TrialRecordExtension }],
48
+ });
49
+ ```
50
+
51
+ Next, create a video configuration trial as described above. Add trial recording
52
+ to the extensions parameter of the trial that needs to be recorded. Any trial
53
+ you design can be recorded by add this extension.
54
+
55
+ ```javascript
56
+ const trialRec = {
57
+ // ... Other trial paramters ...
58
+ extensions: [{ type: chsRecord.TrialRecordExtension }],
59
+ };
60
+ ```
61
+
62
+ Finally, insert the trials into the timeline.
63
+
64
+ ```javascript
65
+ jsPsych.run([videoConfig, trialRec]);
66
+ ```
67
+
68
+ ## Session Recording
69
+
70
+ You might prefer to record across multiple trials in a study session. This can
71
+ be done by using trials created with the start and stop recording plugins. This
72
+ gives a bit of flexibility over which of the study trials are recorded.
73
+
74
+ To record a study session, create the start and stop recording trials.
75
+
76
+ ```javascript
77
+ const startRec = { type: chsRecord.StartRecordPlugin };
78
+ const stopRec = { type: chsRecord.StopRecordPlugin };
79
+ ```
80
+
81
+ Next, create the trials that you would like to be recorded.
82
+
83
+ ```javascript
84
+ const morning = { type: jsPsychHtmlKeyboardResponse, stimulus: "Good morning!" };
85
+ const evening = { type: jsPsychHtmlKeyboardResponse stimulus: "Good evening!" };
86
+ const night = { type: jsPsychHtmlKeyboardResponse, stimulus: "Good night!" };
87
+ ```
88
+
89
+ Lastly, add these trials to the timeline. Again, the video configuration trial
90
+ must come before any other recording trials.
91
+
92
+ ```javascript
93
+ jsPsych.run([videoConfig, startRec, morning, evening, night, stopRec]);
94
+ ```
95
+
96
+ It's possible to record only some of the trials. This can be done by moving the
97
+ stop or start recording trials within the timeline.
98
+
99
+ ```javascript
100
+ jsPsych.run([videoConfig, startRec, morning, evening, stopRec, night]);
101
+ ```
102
+
103
+ ## Video Consent
104
+
105
+ Users will need to record themselves accepting the consent document for your
106
+ study. This trial will allow the user to read the consent document and record a
107
+ video accepting it.
108
+
109
+ To create the video consent trial.
110
+
111
+ ```javascript
112
+ const videoConsent = { type: chsRecord.VideoConsentPlugin, ...parameters };
113
+ ```
114
+
115
+ ### Example
116
+
117
+ ```javascript
118
+ const videoConsent = {
119
+ type: chsRecord.VideoConsentPlugin,
120
+ PIName: "Jane Smith",
121
+ institution: "Science University",
122
+ PIContact: "Jane Smith at 123 456 7890",
123
+ purpose:
124
+ "Why do babies love cats? This study will help us find out whether babies love cats because of their soft fur or their twitchy tails.",
125
+ procedures:
126
+ "Your child will be shown pictures of lots of different cats, along with noises that cats make like meowing and purring. We are interested in which pictures and sounds make your child smile. We will ask you (the parent) to turn around to avoid influencing your child's responses.",
127
+ risk_statement:
128
+ "There are no expected risks if you participate in the study. (This is optional, but should typically be included. If you leave it out there's no 'risks' section and you should include risk information elsewhere.)",
129
+ voluntary_participation:
130
+ "There are two sessions in this study; you will be invited to complete another session next month. It is okay not to do both sessions! (This is optional; leave it out if you don't need to say anything besides participation in this session being voluntary.)",
131
+ payment:
132
+ "After you finish the study, we will email you a $5 BabyStore gift card within approximately three days. To be eligible for the gift card your child must be in the age range for this study, you need to submit a valid consent statement, and we need to see that there is a child with you. But we will send a gift card even if you do not finish the whole study or we are not able to use your child's data! There are no other direct benefits to you or your child from participating, but we hope you will enjoy the experience.",
133
+ datause:
134
+ "We are primarily interested in your child's emotional reactions to the images and sounds. A research assistant will watch your video to measure the precise amount of delight in your child's face as he or she sees each cat picture.",
135
+ include_databrary: true,
136
+ additional_video_privacy_statement:
137
+ "We will also ask your permission to use your videos as stimuli for other parents. (This is optional; leave it out if there aren't additional ways you'll share video beyond as described in the participant's video privacy level and Databrary selections.)",
138
+ gdpr: false,
139
+ research_rights_statement:
140
+ "You are not waiving any legal claims, rights or remedies because of your participation in this research study. If you feel you have been treated unfairly, or you have questions regarding your rights as a research subject, you may contact the [IRB NAME], [INSTITUTION], [ADDRESS/CONTACT]",
141
+ additional_segments: [
142
+ {
143
+ title: "US Patriot Act Disclosure",
144
+ text: "[EXAMPLE ONLY, PLEASE REMOVE ADDITIONAL_SEGMENTS UNLESS YOU NEED THEM.] Lookit is a U.S. organization and all information gathered from the website is stored on servers based in the U.S. Therefore, your video recordings are subject to U.S. laws, such as the US Patriot Act. This act allows authorities access to the records of internet service providers. If you choose to participate in this study, you understand that your video recording will be stored and accessed in the USA. The security and privacy policy for Lookit can be found at the following link: <a href='https://lookit.mit.edu/privacy/' target='_blank' rel='noopener'>https://lookit.mit.edu/privacy/</a>.",
145
+ },
146
+ ],
147
+ };
148
+ ```
149
+
150
+ ### Parameters
151
+
152
+ #### Standard fields
153
+
154
+ **`locale` [String | "en-us"]**
155
+
156
+ Set this parameter to the languages 2 letter code. In some cases, a regional
157
+ code will have to be provided as well. For example, we currently support english
158
+ only from the US region. Therefore, to get the US english translation you would
159
+ put "en-US" for the locale. We support the following language codes:
160
+
161
+ | Language | Region | Code |
162
+ | -------------- | ------ | ----- |
163
+ | Basque | | eu |
164
+ | Dutch, Flemish | | nl |
165
+ | English | U.S.A. | en-US |
166
+ | French | | fr |
167
+ | Hungarian | | hu |
168
+ | Italian | | it |
169
+ | Japanese | | ja |
170
+ | Portuguese | Brazil | pt-BR |
171
+ | Portuguese | | pt |
172
+
173
+ **`additional_video_privacy_statement` [String]**
174
+
175
+ Optional additional text for under header “Who can see our webcam recordings”.
176
+ For cases where researchers ask for other specific permission to share videos,
177
+ separate from the exit survey, or want to provide more detail or different
178
+ language about Databrary sharing.
179
+
180
+ **`datause` [String]**
181
+
182
+ Study-specific data use statement (optional). This will follow more general text
183
+ like: “The research group led by [PIName] at [institution] will have access to
184
+ video and other data collected during this session. We will also have access to
185
+ your account profile, demographic survey, and the child profile for the child
186
+ who is participating, including changes you make in the future to any of this
187
+ information. We may study your child’s responses in connection with his or her
188
+ previous responses to this or other studies run by our group, siblings’
189
+ responses to this or other studies run by our group, or demographic survey
190
+ responses.” (For exact text, please see specific template.)
191
+
192
+ You may want to note what measures you will actually be coding for (looking
193
+ time, facial expressions, parent-child interaction, etc.) and other more
194
+ specific information about your use of data from this study here. For instance,
195
+ you would note if you were building a corpus of naturalistic data that may be
196
+ used to answer a variety of questions (rather than just collecting data for a
197
+ single planned study).
198
+
199
+ **`gdpr` [Boolean | false]**
200
+
201
+ Whether to include a section on GDPR.
202
+
203
+ **`gdpr_personal_data` [String]**
204
+
205
+ List of types of personal information collected, for GDPR section only. Do not
206
+ include special category information, which is listed separately.
207
+
208
+ **`gdpr_sensitive_data` [String]**
209
+
210
+ List of types of special category information collected, for GDPR section only.
211
+ Include all that apply: racial or ethnic origin; political opinions; religious
212
+ or philosophical beliefs; trade union membership; processing of genetic data;
213
+ biometric data; health data; and/or sex life or sexual orientation information
214
+
215
+ **`PIName` [String]**
216
+
217
+ Name of PI running this study
218
+
219
+ **`include_databrary` [Boolean | false]**
220
+
221
+ Whether to include a paragraph about Databrary under “Who can see our webcam
222
+ recordings?”.
223
+
224
+ **`institution` [String]**
225
+
226
+ Name of institution running this study (if ambiguous, list institution whose IRB
227
+ approved the study)’
228
+
229
+ **`PIContact` [String]**
230
+
231
+ Contact information for PI or lab in case of participant questions or concerns.
232
+ This will directly follow the phrase “please contact”, so format accordingly:
233
+ e.g., “the XYZ lab at xyz@science.edu” or “Mary Smith at 123 456 7890”.
234
+
235
+ **`payment` [String]**
236
+
237
+ Statement about payment/compensation for participation, including a statement
238
+ that there are no additional benefits anticipated to the participant. E.g.,
239
+ “After you finish the study, we will email you a $5 BabyStore gift card within
240
+ approximately three days. To be eligible for the gift card your child must be in
241
+ the age range for this study, you need to submit a valid consent statement, and
242
+ we need to see that there is a child with you. But we will send a gift card even
243
+ if you do not finish the whole study or we are not able to use your child’s
244
+ data! There are no other direct benefits to you or your child from
245
+ participating, but we hope you will enjoy the experience.”
246
+
247
+ This section is by default titled “Are there any benefits to your family?”; it
248
+ should only include information about benefits and compensation. If your IRB
249
+ prefers to combine risk/benefit information, you can change this to something
250
+ like “What are the risks and benefits if you participate?” and include both
251
+ here, then omit the risk_statement.
252
+
253
+ **`private_level_only` [Boolean | false]**
254
+
255
+ Whether to describe only the “private” video privacy level under the heading
256
+ “Who will be able to see your webcam recordings?” Only use this option if your
257
+ IRB has a hard restriction against even offering participants the option to
258
+ share their videos more broadly, and in conjunction with the corresponding
259
+ restriction of options in the exit survey!
260
+
261
+ **`procedures` [String]**
262
+
263
+ Brief description of study procedures. For consent templates 001 and 002, this
264
+ should include any risks or a statement that there are no anticipated risks.
265
+ (For consent template 003, that is included in payment). We add a statement
266
+ about the duration (from your study definition) to the start (e.g., “This study
267
+ takes about 10 minutes to complete”), so you don’t need to include that. It can
268
+ be in third person or addressed to the parent. E.g., “Your child will be shown
269
+ pictures of lots of different cats, along with noises that cats make like
270
+ meowing and purring. We are interested in which pictures and sounds make your
271
+ child smile. We will ask you (the parent) to turn around to avoid influencing
272
+ your child’s responses. There are no anticipated risks associated with
273
+ participating.”
274
+
275
+ **`purpose` [String]**
276
+
277
+ Brief description of purpose of study - 1-2 sentences that describe what you are
278
+ trying to find out. Language should be as straightforward and accessible as
279
+ possible! E.g., “Why do babies love cats? This study will help us find out
280
+ whether babies love cats because of their soft fur or their twitchy tails.”
281
+
282
+ **`research_rights_statement` [String]**
283
+
284
+ Statement about rights of research subjects and how to contact IRB. For
285
+ instance, MIT’s standard language is: You are not waiving any legal claims,
286
+ rights or remedies because of your participation in this research study. If you
287
+ feel you have been treated unfairly, or you have questions regarding your rights
288
+ as a research subject, you may contact [CONTACT INFO].
289
+
290
+ **`risk_statement` [String]**
291
+
292
+ Optional statement; if provided, it is displayed under a header “Are there any
293
+ risks if you participate?”.
294
+
295
+ **`voluntary_participation` [String]**
296
+
297
+ Optional additional text for under header “Participation is voluntary”. E.g.,
298
+ “There are two sessions in this study; you will be invited to complete another
299
+ session next month. It is okay not to do both sessions!”
300
+
301
+ #### Additional customization available if REQUIRED by your IRB
302
+
303
+ To accommodate a variety of idiosyncratic IRB requirements, various other fields
304
+ are technically customizable. Please start by trying to get approval for a
305
+ standard Lookit consent form, because it helps participants for the forms to
306
+ have common structure and language. If your IRB says no, you need to use their
307
+ usual form that’s 14 pages long, please explain that Lookit requires you to use
308
+ of one of our standard forms to ensure a smooth participant experience; this is
309
+ in the Terms of Use! If it really won’t be possible to use Lookit without making
310
+ more changes, please let us know before using the following fields to further
311
+ customize the consent form:
312
+
313
+ **`purpose_header` [String]**
314
+
315
+ Custom alternate header for the section on study purpose.
316
+
317
+ **`procedures_header` [String]**
318
+
319
+ Custom alternate header for the section on study procedures.
320
+
321
+ **`participation_header` [String]**
322
+
323
+ Custom alternate header for the section on participation being voluntary.
324
+
325
+ **`benefits_header` [String]**
326
+
327
+ Custom alternate header for the section on benefits/compensation.
328
+
329
+ **`risk_header` [String]**
330
+
331
+ Custom alternate header for risks section.
332
+
333
+ **`summary_statement` [String]**
334
+
335
+ Statement inserted at the beginning of the consent form, right after
336
+ “Researchers led by … are running this study … on Lookit.” Please only use this
337
+ if your IRB requires particular information to be included at the beginning of
338
+ the form; information is usually easier for participants to find under the
339
+ appropriate header rather than inserted here!
340
+
341
+ **`additional_segments` [Array]**
342
+
343
+ List of additional custom sections of the consent form, e.g. US Patriot Act
344
+ Disclosure or child abuse reporting obligation disclosure. These are subject to
345
+ Lookit approval and in general can only add information that was true anyway but
346
+ that your IRB needs explicitly listed.
347
+
348
+ Each section can have fields:
349
+
350
+ ```javascript
351
+ {
352
+ title: "title of section",
353
+ text: "content of section"
354
+ }
355
+ ```
356
+
357
+ **`prompt_all_adults` [Boolean | false]**
358
+
359
+ Whether to include an addition step #4 prompting any other adults present to
360
+ read a statement of consent (I have read and understand the consent document. I
361
+ also agree to participate in this study.)
362
+
363
+ **`prompt_only_adults` [Boolean | false]**
364
+
365
+ Whether to prompt only the adult for consent for themselves to participate,
366
+ rather than also referencing a child. This is for occasional studies running an
367
+ adult comparison group.
368
+
369
+ **`consent_statement_text` [String]**
370
+
371
+ Replace the default spoken consent statement with your custom text.
372
+
373
+ **`omit_injury_phrase` [Boolean | false]**
374
+
375
+ Whether to omit the phrase “or in the very unlikely event of a research-related
376
+ injury” from the contact section. (This was required by the Northwestern IRB.)