-
Notifications
You must be signed in to change notification settings - Fork 0
/
baby-lookingtime-boilerplate.js
303 lines (299 loc) · 16.3 KB
/
baby-lookingtime-boilerplate.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
function generateProtocol(child, pastSessions) {
/* ------------ DEFAULT INSTRUCTIONS FROM LOOKIT ------------
*
* Generate the protocol for this study.
*
* @param {Object} child
* The child currently participating in this study. Includes fields:
* givenName (string)
* birthday (Date)
* gender (string, 'm' / 'f' / 'o')
* ageAtBirth (string, e.g. '25 weeks'. One of '40 or more weeks',
* '39 weeks' through '24 weeks', 'Under 24 weeks', or
* 'Not sure or prefer not to answer')
* additionalInformation (string)
* languageList (string) space-separated list of languages child is
* exposed to (2-letter codes)
* conditionList (string) space-separated list of conditions/characteristics
* of child from registration form, as used in criteria expression
* - e.g. "autism_spectrum_disorder deaf multiple_birth"
*
* Use child.get to access these fields: e.g., child.get('givenName') returns
* the child's given name.
*
* @param {!Array<Object>} pastSessions
* List of past sessions for this child and this study, in reverse time order:
* pastSessions[0] is THIS session, pastSessions[1] the previous session,
* back to pastSessions[pastSessions.length - 1] which has the very first
* session.
*
* Each session has the following fields, corresponding to values available
* in Lookit:
*
* createdOn (Date)
* conditions
* expData
* sequence
* completed
* globalEventTimings
* completedConsentFrame (note - this list will include even "responses")
* where the user did not complete the consent form!
* demographicSnapshot
* isPreview
*
* @return {Object} Protocol specification for Lookit study; object with 'frames'
* and 'sequence' keys.
*/
// ------------ FRAMES ------------
// The frames that will be in your study.
let frames = {
"welcome-page": {
"kind": "exp-lookit-text",
"blocks": [
{
"title": "Welcome to our study!"
},
{
//Edit [GOAL OF EXPERIMENT] below
"text": "We are researchers from the Child Language Lab at the University of Pennsylvania. This experiment aims to [GOAL OF EXPERIMENT]. "
},
{
//Edit this overview as necessary
"text": "Thank you so much for joining the study! First, we need to make sure you have the right computer setup. Then, you are invited to read the consent document and decide whether to participate. You will then read the experiment instructions, and preview the materials. After the experiment is over, you will be asked to fill out a survey."
}
],
"showPreviousButton": false
},
"country-note": {
"kind": "exp-lookit-text",
"blocks": [
{
"title": "A quick note..."
},
{
"text": "Due to restrictions from the university, only participants from the United States are allowed to participate in this study at the moment. We will continue working on changing this, because we know that having a diverse group of participants is important!"
},
{
"text": "If you choose to continue, it means you have read this note and confirm that you are coming from the United States."
}
],
"showPreviousButton": false
},
"video-config": {
"kind": "exp-video-config",
"troubleshootingIntro": ""
},
"video-consent": {
"kind": "exp-lookit-video-consent",
"template": "consent_003",
"PIName": "Kathryn Schuler",
"institution": "University of Pennsylvania",
"PIContact": "Kathryn Schuler at 215-898-6909 or the Child Language Lab at [email protected]",
"purpose": "We are studying [PURPOSE OF STUDY].", //Edit [PURPOSE OF STUDY]
"procedures": "[DESCRIPTION OF STUDY PROCEDURE]", //Edit [DESCRIPTION OF STUDY PROCEDURE]
"payment": "[STATEMENT ABOUT BENEFITS, RISKS, AND COMPENSATION]", //Edit [STATEMENT ABOUT BENEFITS, RISKS, AND COMPENSATION]
"datause": "Any data stored by researchers will be de-identified (your child’s personal identifying information will be removed) and may be stored for future research.",
"gdpr": false,
"research_rights_statement": "Participation in this study is entirely voluntary for both you and your child. Your child may decline to participate or withdraw from the study at any time without any negative consequences. If you or your child withdraw, any existing data may be kept as a record, but your data will not be part of any publications or presentations. If you have questions about your child’s rights as a research participant, you may also contact the Office of Regulatory Affairs at the University of Pennsylvania at 215-898-2614.",
"additional_segments": [
{
"title": "Confidentiality",
"text": "In order to keep information about your child safe, the data stored by the research team is separated from your child’s name and coded with an index number. The mapping between this index number and your child’s name will be stored separately from the data in a password-protected encrypted database. Identifiable information is never shared with anyone outside our research team."
},
{
"title": "Authorization",
"text": "By granting permission, you are indicating that you understand the information in this consent form, including: the risks and benefits to you and your child, that being in this study is voluntary, that you and your child choose to be in this study, and that you or your child can withdraw at any time."
}
]
},
"testing-and-instructions": {
"kind" : "exp-lookit-instructions",
"blocks": [
{
"title": "Audio Testing",
//Edit [DESCRIPTION OF AUDIO] below
"text": "In the experiment, your baby will listen to audio recordings of [DESCRIPTION OF AUDIO]. To make sure that your baby can hear them well, please try playing the sample audio below.",
"mediaBlock": {
"text": "You should hear 'Ready to go?' You can adjust the volume now.",
"isVideo": false,
"sources": [
{
"src": "https://s3.amazonaws.com/lookitcontents/exp-physics-final/audio/ready.mp3",
"type": "audio/mp3"
},
{
"src": "https://s3.amazonaws.com/lookitcontents/exp-physics-final/audio/ready.ogg",
"type": "audio/ogg"
}
],
"mustPlay": true,
"warningText": "Please try playing the sample audio."
}
},
{
//Edit [INSTRUCTIONS] below. You can add or remove instructions as necessary,
//or delete this entire "Other Instructions" block if you do not need it.
"title": "Other Instructions",
"listblocks": [
{
"text": "[INSTRUCTIONS]"
},
{
"text": "[INSTRUCTIONS]"
}
]
}
],
"showWebcam": false,
"nextButtonText": "Next",
"showPreviousButton": false
},
"preview": {
"kind": "exp-lookit-stimuli-preview",
"doRecording": true,
"skipButtonText": "Skip preview",
"previewButtonText": "I'd like to preview the section",
"showPreviousButton": false,
"blocks": [
{
//Edit [DESCRIPTION] below
"text": "This experiment consists of [DESCRIPTION]. Your baby will [DESCRIPTION]"
},
{
//Edit [INSTRUCTIONS] below
"text": "[INSTRUCTIONS (e.g. Please try to hold your baby in the same position)]"
},
{
"text": "If you'd like to see the materials your baby will be shown, you can take a look ahead of time now. It's important that you preview them without your baby, so that the materials will still be new to them."
}
],
//Replace the URL below with the URL of your actual directory
"baseDir": "https://raw.githubusercontent.com/kimberscott/placeholder-stimuli/master/",
"videoTypes": ["webm", "mp4"],
"audioTypes": ["mp3", "ogg"],
//Replace the stimuli below with your actual preview stimuli and edit [CAPTION TEXT].
//Add or remove stimuli as necessary.
"stimuli": [
{
"caption": "[CAPTION TEXT]",
"video": "cropped_book"
},
{
"caption": "[CAPTION TEXT]",
"image": "square.png"
},
{
"caption": "[CAPTION TEXT]",
"audio": "sample_1"
}
]
},
"webcam-setup": {
"kind": "exp-video-config-quality",
"title": "Webcam setup for the experiment",
"introText": "We'll be analyzing how long your baby looks at the screen during the videos--but only if we can tell where that is! Please check each of the following to ensure we're able to use your video:",
"requireItemConfirmation": true,
"completedItemText": "Did it!",
"instructionBlocks": [
{
"text": "<strong>Make sure the webcam you're using is roughly centered</strong> relative to this monitor. ",
"image": {
"src": "https://s3.amazonaws.com/lookitcontents/website/centering.png",
"alt": "Example images of using centered external webcam on monitor or built-in webcam on laptop."
}
},
{
"text": "<strong>Turn off any other monitors</strong> connected to your computer, besides the one with the centered webcam. (If there's just one monitor, you're all set!)",
"image": {
"src": "https://s3.amazonaws.com/lookitcontents/website/monitors.png",
"alt": "Example images showing laptop screen turned off if using external monitor and webcam, or external monitor turned off if using built-in webcam and laptop screen."
}
},
{
"text": "Check the lighting by making sure you can <strong>clearly see your own eyes</strong> on the webcam view to the right. You may need to either turn on a light or reduce light coming from behind you.",
"image": {
"src": "https://s3.amazonaws.com/lookitcontents/website/lighting.png",
"alt": "Example images showing good lighting, room too dark, and backlit scene where eyes are not visible."
}
},
{
"text": "If it's practical, <strong>minimize exciting things</strong> that are visible behind or to the side of the screen--for instance, by facing a wall instead of the kitchen. (If this isn't practical for you, don't worry about it--just check the box!)",
"image": {
"src": "https://s3.amazonaws.com/lookitcontents/website/distractions.png",
"alt": "Example images showing a child and puppy next to the computer, versus a computer just on its own."
}
},
{
"text": "During the study, we’ll ask you to sit facing towards the monitor, and hold your baby on your lap. Make sure that the webcam is angled up or down enough that <strong>your baby is visible in this position</strong>. (Your face doesn't have to show up in the webcam.)"
}
],
"requireTestVideo": true,
"showRecordMenu": true,
"recordingInstructionText": "You should be able to see your camera view above. Please create and view a short recording to see how your setup looks. The experiment will begin on the next page."
},
"end-of-experiment": {
"kind": "exp-lookit-text",
"blocks": [
{
"title": "This is the end of the study.",
"text": "Thank you for your participation! We appreciate you and your baby's time and effort."
},
{
"text": "Please fill out the mandatory survey on the next page. In the survey, you will be able to decide how your data can be used and give us feedback. More information about this experiment and your compensation will come after the survey!"
}
],
"showPreviousButton" : false
},
"exit-survey": {
"kind" : "exp-lookit-exit-survey",
"debriefing": {
"title": "Thank you!",
"blocks": [
{
"listblocks": [
{
//Edit [DESCRIPTION OF STUDY]
"text": "This study investigates [DESCRIPTION OF STUDY]"
},
{
//Edit [EXPLANATION]
"text": "We test this hypothesis by [EXPLANATION]"
},
//Add more blocks explaining the study if needed
{
//Edit [EXPLANATION]
"text": 'This study will help us better understand [EXPLANATION]. If you want to learn more about our research in child language development, you are more than welcome to check out our lab website: <a href="https://web.childlanglab.com/"" rel="noopener" target="_blank">The Child Language Lab</a>!'
},
{
"text": "We want to thank you and your child again for your participation. We will email you a $5 Amazon gift card within a week of your participation. To be eligible for compensation, you should have provided a valid consent video, and your child should meet all the eligibility criteria. You may only participate once for each eligible baby. Your baby should be clearly visible in the video consent and throughout the trials."
}
]
}
],
"image": {
"src": "https://raw.githubusercontent.com/Shengqi-Iris-Zhong/lookit-recursion-stimuli/master/img/end-pic.jpg",
"alt": "thank you"
}
}
}
}
// ------------ SEQUENCE OF FRAMES ------------
// The order that your frames will be in.
let frame_sequence = [
"welcome-page",
"country-note",
"video-config",
"video-consent",
"testing-and-instructions",
"preview",
"webcam-setup",
"end-of-experiment",
"exit-survey"
]
// This returns a study protocol with "frames" and "sequence" fields just like when defining the protocol in JSON only
var protocol = {
frames: frames,
sequence: frame_sequence
};
return protocol;
}