API Docs for: 0.5.1
Show:

ExpLookitInstructions Class

A frame to display bulleted instructions to the user, along with an audio clip to make sure sound playback is working (this may, optionally, be required to move on). This is intended to come immediately before test trials which may be fullscreen, and is therefore an 'unsafe' frame (allows proceeding even if data isn't saved); no user data from this frame is critical.

"frames": {
"final-instructions": {
           "mustPlay": true,
           "kind": "exp-lookit-instructions",
           "nextButtonText": "Start the videos! \n (You'll have a moment to turn around.)",
           "id": "final-instructions",
           "blocks": [
               {
                   "text": "The video section will take about 6 minutes to complete. After that, you will be able to select a level of privacy for your data."
               },
               {
                   "title": "Study overview",
                   "listblocks": [
                       {
                           "text": "There will be four videos, each a little over a minute long. "
                       },
                       {
                           "text": "You’ll hear spoken updates between videos."
                       }
                   ]
               },
               {
                   "title": "During the videos",
                   "listblocks": [
                       {
                           "text": "Please face away from the screen, holding your infant so they can look over your shoulder. Please don't look at the videos yourself, as we may not be able to use your infant’s data in that case.",
                           "image": {
                               "src": "https://s3.amazonaws.com/lookitcontents/exp-physics/OverShoulder.jpg",
                               "alt": "Father holding child looking over his shoulder"
                           }
                       },
                       {
                           "text": "Don’t worry if your baby isn’t looking at the screen the entire time! Please just try to keep them facing the screen so they can look if they want to."
                       },
                       {
                           "text": "If you’d like, you can direct your infant’s attention to the screen by saying things like, 'What’s happening?' But don’t talk about specific things that might be happening in the videos."
                       }
                   ]
               },
               {
                   "title": "Pausing and stopping",
                   "listblocks": [
                       {
                           "text": "If your child gets fussy or distracted, or you need to attend to something else for a moment, you can pause the study during the breaks between videos. "
                       },
                       {
                           "text": "If you need to end the study early, just close the window or tab. You’ll be prompted to note any technical problems you might be experiencing and to select a privacy level for your videos."
                       }
                   ]
               }
           ],
           "audioBlock": {
               "text": "You should hear 'Ready to go?'",
               "warningText": "Please try playing the sample audio.",
               "title": "Test your audio",
               "sources": [
                   {
                       "src": "https://s3.amazonaws.com/lookitcontents/ready.mp3",
                       "type": "audio/mp3"
                   },
                   {
                       "src": "https://s3.amazonaws.com/lookitcontents/ready.ogg",
                       "type": "audio/ogg"
                   }
               ]
           }
       }
}

Methods

serializeContent

(
  • showWarning
  • didFinishSound
)
Object

Parameters captured and sent to the server

Parameters:

  • showWarning Boolean

    whether the warning about sound being played is currently shown

  • didFinishSound Boolean

    whether the user played the sound clip

Returns:

Object:

The payload sent to the server

Properties

audioBlock

Object

Object specifying the audio clip to include (optional)

Sub-properties:

  • title String

    Title text to show above audio controls

  • text String

    Text to show below audio controls

  • warningText String

    Text to show in red if user tries to proceed but hasn't played audio; only used if mustPlay is true

  • sources Object[]

    Array of {src: 'url', type: 'MIMEtype'} objects specifying audio sources

blocks

Object[]

Array of objects specifying text/images of instructions to display

Sub-properties:

  • title String

    Title of this section

  • text String

    Paragraph text of this section

  • listblocks Object[]

    Object specifying bulleted points for this section. Each object is of the form: {text: 'text of bullet point', image: {src: 'url', alt: 'alt-text'}}. Images are optional.

id

String

A unique identifier for this item

mustPlay

Boolean

Whether the user should be forced to play the audio clip before leaving the page

nextButtonText

String

Text to display on the 'next frame' button

Default: 'Start the videos! \n (You\'ll have a moment to turn around.)'

showPreviousButton

Boolean

Whether to show a 'previous' button

Default: true

Events

nextFrame

Move to next frame