@lookit/record 2.0.0 → 3.0.1

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 CHANGED
@@ -25,7 +25,7 @@ following language codes:
25
25
  | Portuguese | Brazil | pt-BR |
26
26
  | Portuguese | | pt |
27
27
 
28
- ## Video Configuration
28
+ ## Video Configuration Plugin
29
29
 
30
30
  To record _any_ video during an experiment, including a consent video, you must
31
31
  add a video configuration trial. This trial allows the user to give permissions
@@ -61,51 +61,20 @@ const videoConfig = {
61
61
  };
62
62
  ```
63
63
 
64
- ## Video Consent
64
+ ## Video Consent Plugin
65
65
 
66
66
  Users will need to record themselves accepting the consent document for your
67
67
  study. This trial will allow the user to read the consent document and record a
68
68
  video accepting it.
69
69
 
70
- To create the video consent trial.
70
+ !!! caution "Don't forget a video config trial!"
71
71
 
72
- ```javascript
73
- const videoConsent = { type: chsRecord.VideoConsentPlugin, ...parameters };
74
- ```
72
+ You MUST have a video config trial in your experiment timeline before the video consent trial.
75
73
 
76
- ### Example
74
+ To create the video consent trial:
77
75
 
78
76
  ```javascript
79
- const videoConsent = {
80
- type: chsRecord.VideoConsentPlugin,
81
- PIName: "Jane Smith",
82
- institution: "Science University",
83
- PIContact: "Jane Smith at 123 456 7890",
84
- purpose:
85
- "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.",
86
- procedures:
87
- "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.",
88
- risk_statement:
89
- "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.)",
90
- voluntary_participation:
91
- "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.)",
92
- payment:
93
- "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.",
94
- datause:
95
- "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.",
96
- include_databrary: true,
97
- additional_video_privacy_statement:
98
- "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.)",
99
- gdpr: false,
100
- research_rights_statement:
101
- "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]",
102
- additional_segments: [
103
- {
104
- title: "US Patriot Act Disclosure",
105
- 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>.",
106
- },
107
- ],
108
- };
77
+ const videoConsent = { type: chsRecord.VideoConsentPlugin, ...parameters };
109
78
  ```
110
79
 
111
80
  ### Parameters
@@ -328,7 +297,68 @@ Replace the default spoken consent statement with your custom text.
328
297
  Whether to omit the phrase “or in the very unlikely event of a research-related
329
298
  injury” from the contact section. (This was required by the Northwestern IRB.)
330
299
 
331
- ## Trial Recording
300
+ ### Example
301
+
302
+ ```javascript
303
+ const videoConsent = {
304
+ type: chsRecord.VideoConsentPlugin,
305
+ PIName: "Jane Smith",
306
+ institution: "Science University",
307
+ PIContact: "Jane Smith at 123 456 7890",
308
+ purpose:
309
+ "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.",
310
+ procedures:
311
+ "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.",
312
+ risk_statement:
313
+ "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.)",
314
+ voluntary_participation:
315
+ "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.)",
316
+ payment:
317
+ "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.",
318
+ datause:
319
+ "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.",
320
+ include_databrary: true,
321
+ additional_video_privacy_statement:
322
+ "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.)",
323
+ gdpr: false,
324
+ research_rights_statement:
325
+ "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]",
326
+ additional_segments: [
327
+ {
328
+ title: "US Patriot Act Disclosure",
329
+ 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>.",
330
+ },
331
+ ],
332
+ };
333
+ ```
334
+
335
+ ## Trial Recording Extension
336
+
337
+ Trial recording can be added to most jsPsych trials. This is a jsPsych extension
338
+ that allows you to add video recording to the trial. The trial will start once
339
+ the video recording has been set up, and the video recording will finish as soon
340
+ as the trial has ended.
341
+
342
+ !!! important "When to use trial recording"
343
+
344
+ Trial recording should NOT occur simultaneously with session recording, or with any plugins that already use the webcam (e.g. video config, video consent).
345
+
346
+ To use the CHS trial recording extension, you need to:
347
+
348
+ 1. Add it to the experiment settings, which is an optional object passed to
349
+ `initjsPsych`.
350
+ 2. Add it to the `extensions` parameter for any trial(s) that you want to be
351
+ recorded.
352
+
353
+ !!! caution "Don't forget a video config trial!"
354
+
355
+ You MUST have a video config trial in your experiment timeline before doing any trial recording.
356
+
357
+ ### Parameters
358
+
359
+ This extension does not accept any parameters.
360
+
361
+ ### Example
332
362
 
333
363
  To record a single trial, you will have to first load the extension in
334
364
  `initJsPsych`.
@@ -362,7 +392,48 @@ You might prefer to record across multiple trials in a study session. This can
362
392
  be done by using trials created with the start and stop recording plugins. This
363
393
  gives a bit of flexibility over which of the study trials are recorded.
364
394
 
365
- To record a study session, create the start and stop recording trials.
395
+ !!! important "When to use session recording"
396
+
397
+ Sesssion recording should NOT occur simultaneously with trial recording, or with any plugins that already use the webcam (e.g. video config, video consent).
398
+
399
+ To record a set of trials, add a 'start' trial in your jsPsych experiment
400
+ timeline right before you'd like to start recording, and add a 'stop' trial at
401
+ the point in your timeline when you'd like to stop recording.
402
+
403
+ !!! caution "Don't forget a video config trial!"
404
+
405
+ You MUST have a video config trial in your experiment timeline before doing any session recording.
406
+
407
+ ### Start Recording Plugin
408
+
409
+ The plugin to start session recording is called `chsRecord.StartRecordPlugin`.
410
+
411
+ ```javascript
412
+ const startRec = { type: chsRecord.StartRecordPlugin };
413
+ ```
414
+
415
+ #### Parameters
416
+
417
+ This plugin does not accept any parameters, other those available in all
418
+ plugins.
419
+
420
+ ### Stop Recording Plugin
421
+
422
+ The plugin to stop session recording is called `chsRecord.StopRecordPlugin`.
423
+
424
+ ```javascript
425
+ const stopRec = { type: chsRecord.StopRecordPlugin };
426
+ ```
427
+
428
+ #### Parameters
429
+
430
+ This plugin does not accept any parameters, other those available in all
431
+ plugins.
432
+
433
+ ### Example
434
+
435
+ First, make sure that you've added a video config trial to your experiment
436
+ timeline. Then, create your start and stop recording trials:
366
437
 
367
438
  ```javascript
368
439
  const startRec = { type: chsRecord.StartRecordPlugin };
@@ -390,3 +461,18 @@ stop or start recording trials within the timeline.
390
461
  ```javascript
391
462
  jsPsych.run([videoConfig, startRec, morning, evening, stopRec, night]);
392
463
  ```
464
+
465
+ You can also create more than one session recording:
466
+
467
+ ```javascript
468
+ jsPsych.run([
469
+ videoConfig,
470
+ startRec,
471
+ morning,
472
+ stopRec,
473
+ evening,
474
+ startRec,
475
+ night,
476
+ stopRec,
477
+ ]);
478
+ ```