Show:

Exp-lookit-images-audio-infant-control Class

These docs have moved here.

Infant-controlled version of the Exp-lookit-images-audio frame. This works the same way as exp-lookit-images-audio except that you can enable the parent to:

  • end the trial by pressing the endTrialKey key
  • hold down the lookawayKey (or the mouse button) to indicate that the child is not looking; the trial will automatically end after the lookaway criterion is met. If the 'lookawayTone' is not 'none' a noise is played while the child is looking away to help the parent know the looking coding is working.

You can disable either of these behaviors by setting the key to ''.

The frame will still end when it would have anyway if neither of these things happen! For instance, if you would have displayed an image for 30 seconds, then after 30 seconds the frame will move on, serving as a "ceiling" on looking time.

Lookaway criterion: You have two options for how to determine when the child has looked away long enough to proceed. Set the lookawayType to "total" to accumulate lookaway time until the child has looked away for a total of lookawayThreshold seconds. (For instance, if the lookawayThreshold is 2, then the trial will end after the child looks away for 0.5s, then 1s, then 0.5s.) Set the lookawayType to "continuous" to require that the child look away for a continuous lookawayThreshold-second interval. (For instance, if the lookawayThreshold is 2, then the child might look away for 1s, 1.5s, and 1s but the trial would continue until she looked away for 2s.)

The looking time measurement begins only when the video starts, not while a video connection is established.

If a lookawayKey is defined, lookaways are recorded the entire time the frame is running. However, the looking time measurement only starts once images are displayed (or the "delay" timer starts counting down, for images shown at a delay - but e.g., not during webcam connection). Lookaways at the very start don't count! If the child is not looking at the start, the measurement begins once they look for the first time.

Two pieces of data are recorded for convenience when coding or if implementing a live habituation procedure: totalLookingTime and reasonTrialEnded.

Example usage:

"play-video-twice": {
   "kind": "exp-lookit-video-infant-control",
   "lookawayKey": "p",
   "lookawayType": "total",
   "lookawayThreshold": 2,
   "endTrialKey": "q",
   "lookawayTone": "noise",
   "lookawayToneVolume": 0.25,

   "audio": {
       "loop": false,
       "source": "peekaboo"
   },
   "video": {
       "top": 10,
       "left": 25,
       "loop": true,
       "width": 50,
       "source": "cropped_apple"
   },
   "backgroundColor": "white",
   "autoProceed": true,
   "parentTextBlock": {
       "text": "If your child needs a break, just press X to pause!"
   },
   "requiredDuration": 0,
   "requireAudioCount": 0,
   "requireVideoCount": 2,
   "restartAfterPause": true,
   "pauseKey": "x",
   "pauseKeyDescription": "X",
   "pauseAudio": "pause",
   "pauseVideo": "attentiongrabber",
   "pauseText": "(You'll have a moment to turn around again.)",
   "unpauseAudio": "return_after_pause",
   "doRecording": true,
   "baseDir": "https://www.mit.edu/~kimscott/placeholderstimuli/",
   "audioTypes": [
       "ogg",
       "mp3"
   ],
   "videoTypes": [
       "webm",
       "mp4"
   ]
}

Item Index

Methods

destroyRecorder

()
Destroy recorder and stop accessing webcam

destroySessionRecorder

()
Destroy recorder and stop accessing webcam

endParentControl

()
End period of parent control of trial progression, for instance because trial is paused. Looks to/away will still be logged as events but trial will not end based on parent input.

exitFullscreen

()

Inherited from Full-screen but overwritten in app/mixins/full-screen.js:139

Exit fullscreen mode

hideRecorder

()
Hide the recorder from display. Useful if you would like to keep recording without extra UI elements to distract the user.

makeTimeEvent

(
  • eventName
  • [extra]
)
Object

Create the time event payload for a particular frame / event. This can be overridden to add fields to every event sent by a particular frame

Parameters:

  • eventName String
  • [extra] Object optional

    An object with additional properties to be sent to the server

Returns:

Object:

Event type, time, and any additional metadata provided

onRecordingStarted

()
Function called when frame recording is started automatically. Override to do frame-specific actions at this point (e.g., beginning a test trial).

onSessionRecordingStarted

()
Hook called when session recording is started automatically. Override to do frame-specific actions at this point (e.g., beginning a test trial).

serializeContent

(
  • eventTimings
)
Object

Each frame that extends ExpFrameBase will send at least an array eventTimings, a frame type, and any generateProperties back to the server upon completion. Individual frames may define additional properties that are sent.

Parameters:

Returns:

setupRecorder

(
  • element
)
Promise

Inherited from Session-record but overwritten in app/mixins/video-record.js:294

Set up a video recorder instance

Parameters:

  • element Node
    A DOM node representing where to mount the recorder

Returns:

Promise: A promise representing the result of installing the recorder

showFullscreen

()

Inherited from Full-screen but overwritten in app/mixins/full-screen.js:112

Make a specified element fullscreen

showRecorder

()
Show the recorder to the user. Useful if you want to temporarily show a hidden recorder- eg to let the user fix a problem with video capture settings

startParentControl

()
Begin period of parent control of trial progression. After calling startParentControl(), we wait for the first infant look to the screen (this may be immediate because infant is already looking. After that, whenever infant look-away time reaches criterion (either due to long enough continuous lookaway, or due to cumulative time looking away) we will call onLookawayCriterion(). If startParentControl is called multiple times, each time it's called it starts a "fresh" interval of parent control - i.e. no stored lookaway time, and no assumption the child has previously looked.

startRecorder

()
Start recording

Returns:

Promise Resolves when recording has started

startSessionRecorder

()
Start recording

Returns:

Promise Resolves when recording has started

stopRecorder

()
Stop the recording

Returns:

Promise A promise that resolves when upload is complete

stopSessionRecorder

()
Stop recording

Returns:

Promise Resolves when recording has been uploaded or timed out

whenPossibleToRecordObserver

()
Observer that starts recording once recorder is ready.

whenPossibleToRecordSessionObserver

()
Observer that starts recording once session recorder is ready.

Properties

assetsToExpand

String private

Inherited from Expand-assets (click for formatted description): app/mixins/expand-assets.js:98

Object describing which properties may need expansion

audio

Object[]

Audio file to play at the start of this frame. This can either be an array of {src: 'url', type: 'MIMEtype'} objects, e.g. listing equivalent .mp3 and .ogg files, or can be a single string filename which will be expanded based on baseDir and audioTypes values (see audioTypes).

Default: []

audioOnly

Number

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:158

Whether to do audio-only (vs also video) recording. Can be overridden by consuming frame.

Default: 0

audioTypes

String[]

Inherited from Expand-assets (click for formatted description): app/mixins/expand-assets.js:126

List of audio types to expect for any audio specified just with a string rather than with a list of src/type objects. If audioTypes is ['typeA', 'typeB'] and an audio source is given as intro, the audio source will be expanded out to [ { src: 'baseDir' + 'typeA/intro.typeA', type: 'audio/typeA' }, { src: 'baseDir' + 'typeB/intro.typeB', type: 'audio/typeB' } ]

Default: ['mp3', 'ogg']

autoProceed

Boolean

Whether to proceed automatically when all conditions are met, vs. enabling next button at that point. If true: the next, previous, and replay buttons are hidden, and the frame auto-advances after ALL of the following happen (a) the audio segment (if any) completes (b) the durationSeconds (if any) is achieved (c) a choice is made (if required) (d) that choice is correct (if required) (e) the choice audio (if any) completes (f) the choice text (if any) is dismissed If false: the next, previous, and replay buttons (as applicable) are displayed. It becomes possible to press 'next' only once the conditions above are met.

Default: false

autosave

Number private

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:149

Whether to autosave recordings. Can be overridden by consuming frame. TODO: eventually use this to set up non-recording option for previewing

Default: 1

backgroundColor

String

Color of background. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value for acceptable syntax: can use color names ('blue', 'red', 'green', etc.), or rgb hex values (e.g. '#800080' - include the '#')

Default: 'black'

baseDir

String

Inherited from Expand-assets (click for formatted description): app/mixins/expand-assets.js:106

Base directory for where to find stimuli. Any image src values that are not full paths will be expanded by prefixing with baseDir + img/. Any audio/video src values provided as strings rather than objects with src and type will be expanded out to baseDir/avtype/[stub].avtype, where the potential avtypes are given by audioTypes and videoTypes. baseDir should include a trailing slash (e.g., http://stimuli.org/myexperiment/); if a value is provided that does not end in a slash, one will be added.

Default: ''

canMakeChoiceBeforeAudioFinished

Boolean

Whether the participant can make a choice before audio finishes. (Only relevant if choiceRequired is true.)

Default: false

choiceRequired

Boolean

Whether this is a frame where the user needs to click to select one of the images before proceeding.

Default: false

correctChoiceRequired

Boolean

[Only used if choiceRequired is true] Whether the participant has to select one of the correct images before proceeding.

Default: false

displayFullscreen

Boolean private

Inherited from Full-screen but overwritten in app/mixins/full-screen.js:27

Whether to display this frame fullscreen

Default: false

displayFullscreenOverride

String

Inherited from Full-screen but overwritten in app/mixins/full-screen.js:165

Set to true to display this frame in fullscreen mode, even if the frame type is not always displayed fullscreen. (For instance, you might use this to keep a survey between test trials in fullscreen mode.)

Default: false

doRecording

Boolean

Whether to do webcam recording (will wait for webcam connection before starting audio or showing images if so)

doUseCamera

Boolean

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:165

Whether to use the camera in this frame. Consuming frame should set this property to override if needed.

Default: true

durationSeconds

Number

Minimum duration of frame in seconds. If set, then it will only be possible to proceed to the next frame after both the audio completes AND this duration is acheived.

Default: 0

endSessionRecording

Number

Inherited from Session-record (click for formatted description): app/mixins/session-record.js:98

Whether to end any session (multi-frame) recording at the end of this frame.

Default: false

endTrialKey

String

Inherited from Infant-controlled-timing (click for formatted description): app/mixins/infant-controlled-timing.js:105

Key parent should press to manually move on to next trial. This allows you to have parents control the study by giving instructions like "press q when the child looks away for at least a few seconds" instead of "hold down w whenever the child isn't looking." Use an empty string, '', to not allow this function for this trial. You can look up the names of keys at https://keycode.info. Default is 'q'.

Default: 'q'

fsButtonID

String private

Inherited from Full-screen but overwritten in app/mixins/full-screen.js:35

The element ID of a button to show if the user leaves fullscreen mode

fullScreenElementId

String private

Inherited from Full-screen but overwritten in app/mixins/full-screen.js:20

The element ID of the thing to make full screen (video element, div, etc)

generateProperties

String

Inherited from Exp-frame-base (click for formatted description): app/components/exp-frame-base/component.js:78

Function to generate additional properties for this frame (like {"kind": "exp-lookit-text"}) at the time the frame is initialized. Allows behavior of study to depend on what has happened so far (e.g., answers on a form or to previous test trials). Must be a valid Javascript function, returning an object, provided as a string.

Arguments that will be provided are: expData, sequence, child, pastSessions, conditions.

expData, sequence, and conditions are the same data as would be found in the session data shown on the Lookit experimenter interface under 'Individual Responses', except that they will only contain information up to this point in the study.

expData is an object consisting of frameId: frameData pairs; the data associated with a particular frame depends on the frame kind.

sequence is an ordered list of frameIds, corresponding to the keys in expData.

conditions is an object representing the data stored by any randomizer frames; keys are frameIds for randomizer frames and data stored depends on the randomizer used.

child is an object that has the following properties - use child.get(propertyName) to access:

  • additionalInformation: String; additional information field from child form
  • ageAtBirth: String; child's gestational age at birth in weeks. Possible values are "24" through "39", "na" (not sure or prefer not to answer), "<24" (under 24 weeks), and "40>" (40 or more weeks).
  • birthday: Date object
  • gender: "f" (female), "m" (male), "o" (other), or "na" (prefer not to answer)
  • givenName: String, child's given name/nickname
  • id: String, child UUID
  • 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"

pastSessions is a list of previous response objects for this child and this study, ordered starting from most recent (at index 0 is this session!). Each has properties (access as pastSessions[i].get(propertyName)):

  • completed: Boolean, whether they submitted an exit survey
  • completedConsentFrame: Boolean, whether they got through at least a consent frame
  • conditions: Object representing any conditions assigned by randomizer frames
  • createdOn: Date object
  • expData: Object consisting of frameId: frameData pairs
  • globalEventTimings: list of any events stored outside of individual frames - currently just used for attempts to leave the study early
  • sequence: ordered list of frameIds, corresponding to keys in expData
  • isPreview: Boolean, whether this is from a preview session (possible in the event this is an experimenter's account)

Example:

function(expData, sequence, child, pastSessions, conditions) {
    return {
       'blocks':
            [
                {
                    'text': 'Name: ' + child.get('givenName')
                },
                {
                    'text': 'Frame number: ' + sequence.length
                },
                {
                    'text': 'N past sessions: ' + pastSessions.length
                }
            ]
      };
  }

(This example is split across lines for readability; when added to JSON it would need to be on one line.)

Default: null

highlights

Object[]

Array representing times when particular images should be highlighted. Each element of the array should be of the form {'range': [3.64, 7.83], 'imageId': 'myImageId'}. The two range values are the start and end times of the highlight in seconds, relative to the audio played. The imageId corresponds to the id of an element of images.

Highlights can overlap in time. Any that go longer than the audio will just be ignored/cut off.

One strategy for generating a bunch of highlights for a longer story is to annotate using Audacity and export the labels to get the range values.

Sub-properties:

  • range Array

    [startTimeInSeconds, endTimeInSeconds], e.g. [3.64, 7.83]

  • imageId String

    ID of the image to highlight, corresponding to the id field of the element of images to highlight

images

Object[]

Array of images to display and information about their placement. For each image, you need to specify src (image name/URL) and placement (either by providing left/width/top values, or by using a position preset).

Everything else is optional! This is where you would say that an image should be shown at a delay

Sub-properties:

  • id String

    unique ID for this image

  • src String

    URL of image source. This can be a full URL, or relative to baseDir (see baseDir).

  • alt String

    alt-text for image in case it doesn't load and for screen readers

  • left Number

    left margin, as percentage of story area width. If not provided, the image is centered horizontally.

  • width Number

    image width, as percentage of story area width. Note: in general only provide one of width and height; the other will be adjusted to preserve the image aspect ratio.

  • top Number

    top margin, as percentage of story area height. If not provided, the image is centered vertically.

  • height Number

    image height, as percentage of story area height. Note: in general only provide one of width and height; the other will be adjusted to preserve the image aspect ratio.

  • position String

    one of 'left', 'center', 'right', 'fill' to use presets that place the image in approximately the left, center, or right third of the screen or to fill the screen as much as possible. This overrides left/width/top values if given.

  • nonChoiceOption Boolean

    [Only used if choiceRequired is true] whether this should be treated as a non-clickable option (e.g., this is a picture of a girl, and the child needs to choose whether the girl has a DOG or a CAT)

  • displayDelayMs Number

    Delay at which to show the image after trial start (timing will be relative to any audio or to start of trial if no audio). Optional; default is to show images immediately.

  • feedbackAudio Object[]

    [Only used if choiceRequired is true] Audio to play upon clicking this image. This can either be an array of {src: 'url', type: 'MIMEtype'} objects, e.g. listing equivalent .mp3 and .ogg files, or can be a single string filename which will be expanded based on baseDir and audioTypes values (see audioTypes).

  • feedbackText String

    [Only used if choiceRequired is true] Text to display in a dialogue window upon clicking the image.

lookawayKey

String

Inherited from Infant-controlled-timing (click for formatted description): app/mixins/infant-controlled-timing.js:91

Key parent should press to indicate the child is looking away. If a key is provided, then the trial will end if the child looks away looks long enough per the lookawayType and lookawayThreshold. You can also use 'mouse' to indicate that mouse down/up should be used in place of key down/up events. Use an empty string, '', to not record any lookaways for this trial. You can look up the names of keys at https://keycode.info. Default is 'w'.

Default: 'w'

lookawayThreshold

String

Inherited from Infant-controlled-timing (click for formatted description): app/mixins/infant-controlled-timing.js:77

Lookaway threshold in seconds. How long does the child need to look away before the trial ends? Depending on the lookawayType, this will refer either to the total amount of time the child has looked away since their first look to the screen, or to the length of a single continuous lookaway.

Default: 2

lookawayTone

String

Inherited from Infant-controlled-timing (click for formatted description): app/mixins/infant-controlled-timing.js:118

Type of audio to play during parent-coded lookaways - 'tone' (A 220), 'noise' (pink noise), or 'none'. These tones are available at https://www.mit.edu/~kimscott/placeholderstimuli/ if you want to use them in instructions.

Default: 'noise'

lookawayToneVolume

String

Inherited from Infant-controlled-timing (click for formatted description): app/mixins/infant-controlled-timing.js:132

Volume of lookaway tone

Default: 0.25

lookawayType

String

Inherited from Infant-controlled-timing (click for formatted description): app/mixins/infant-controlled-timing.js:62

Type of lookaway criterion. Must be either 'total' (to count total lookaway time) or 'continuous' (to count only continuous lookaway time). Whichever criterion type is used, only lookaways after the first look to the screen are considered.

Default: 'total'

maximizeDisplay

Boolean

Whether to have the image display area take up the whole screen if possible. This will only apply if (a) there is no parent text and (b) there are no control buttons (next, previous, replay) because the frame auto-proceeds.

Default: false

maxRecordingLength

Number

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:133

Maximum recording length in seconds. Can be overridden by consuming frame.

Default: 7200

maxUploadSeconds

Number

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:140

Maximum time allowed for video upload before proceeding, in seconds. Can be overridden by researcher, based on tradeoff between making families wait and losing data.

Default: 5

pageColor

String

Color of area where images are shown, if different from overall background. Defaults to backgroundColor if one is provided. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value for acceptable syntax: can use color names ('blue', 'red', 'green', etc.), or rgb hex values (e.g. '#800080' - include the '#')

Default: 'white'

parameters

Object[]

Inherited from Exp-frame-base (click for formatted description): app/components/exp-frame-base/component.js:232

An object containing values for any parameters (variables) to use in this frame. Any property VALUES in this frame that match any of the property NAMES in parameters will be replaced by the corresponding parameter value. For example, suppose your frame is:

{
   'kind': 'FRAME_KIND',
   'parameters': {
       'FRAME_KIND': 'exp-lookit-text'
   }
}

Then the frame kind will be exp-lookit-text. This may be useful if you need to repeat values for different frame properties, especially if your frame is actually a randomizer or group. You may use parameters nested within objects (at any depth) or within lists.

You can also use selectors to randomly sample from or permute a list defined in parameters. Suppose STIMLIST is defined in parameters, e.g. a list of potential stimuli. Rather than just using STIMLIST as a value in your frames, you can also:

  • Select the Nth element (0-indexed) of the value of STIMLIST: (Will cause error if N >= THELIST.length)
   'parameterName': 'STIMLIST#N'
  • Select (uniformly) a random element of the value of STIMLIST:
   'parameterName': 'STIMLIST#RAND'
  • Set parameterName to a random permutation of the value of STIMLIST:
   'parameterName': 'STIMLIST#PERM'
  • Select the next element in a random permutation of the value of STIMLIST, which is used across all substitutions in this randomizer. This allows you, for instance, to provide a list of possible images in your parameterSet, and use a different one each frame with the subset/order randomized per participant. If more STIMLIST#UNIQ parameters than elements of STIMLIST are used, we loop back around to the start of the permutation generated for this randomizer.
   'parameterName': 'STIMLIST#UNIQ'

Default: {}

parentTextBlock

Object

Text block to display to parent. (Each field is optional)

Sub-properties:

  • title String

    title to display

  • text String

    paragraph of text

  • css Object

    object specifying any css properties to apply to this section, and their values - e.g. {'color': 'gray', 'font-size': 'large'}

recorder

VideoRecorder private

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:92

The recorder object, accessible to the consuming frame. Includes properties recorder.nWebcams, recorder.hasCamAccess, recorder.micChecked, recorder.connected.

recorderElement

String private

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:117

JQuery string to identify the recorder element.

Default: '#recorder'

recorderReady

Boolean private

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:125

Whether recorder has been set up yet. Automatically set when doing setup. Accessible to consuming frame.

selectNextFrame

String

Inherited from Exp-frame-base (click for formatted description): app/components/exp-frame-base/component.js:169

Function to select which frame index to go to when using the 'next' action on this frame. Allows flexible looping / short-circuiting based on what has happened so far in the study (e.g., once the child answers N questions correctly, move on to next segment). Must be a valid Javascript function, returning a number from 0 through frames.length - 1, provided as a string.

Arguments that will be provided are: frames, frameIndex, expData, sequence, child, pastSessions

frames is an ordered list of frame configurations for this study; each element is an object corresponding directly to a frame you defined in the JSON document for this study (but with any randomizer frames resolved into the particular frames that will be used this time).

frameIndex is the index in frames of the current frame

expData is an object consisting of frameId: frameData pairs; the data associated with a particular frame depends on the frame kind.

sequence is an ordered list of frameIds, corresponding to the keys in expData.

child is an object that has the following properties - use child.get(propertyName) to access:

  • additionalInformation: String; additional information field from child form
  • ageAtBirth: String; child's gestational age at birth in weeks. Possible values are "24" through "39", "na" (not sure or prefer not to answer), "<24" (under 24 weeks), and "40>" (40 or more weeks).
  • birthday: timestamp in format "Mon Apr 10 2017 20:00:00 GMT-0400 (Eastern Daylight Time)"
  • gender: "f" (female), "m" (male), "o" (other), or "na" (prefer not to answer)
  • givenName: String, child's given name/nickname
  • id: String, child UUID

pastSessions is a list of previous response objects for this child and this study, ordered starting from most recent (at index 0 is this session!). Each has properties (access as pastSessions[i].get(propertyName)):

  • completed: Boolean, whether they submitted an exit survey
  • completedConsentFrame: Boolean, whether they got through at least a consent frame
  • conditions: Object representing any conditions assigned by randomizer frames
  • createdOn: timestamp in format "Thu Apr 18 2019 12:33:26 GMT-0400 (Eastern Daylight Time)"
  • expData: Object consisting of frameId: frameData pairs
  • globalEventTimings: list of any events stored outside of individual frames - currently just used for attempts to leave the study early
  • sequence: ordered list of frameIds, corresponding to keys in expData

Example that just sends us to the last frame of the study no matter what: `"function(frames, frameIndex, frameData, expData, sequence, child, pastSessions) {return frames.length - 1;}"``

Default: null

sessionAudioOnly

Number

Inherited from Session-record (click for formatted description): app/mixins/session-record.js:108

Whether to do audio-only (vs also video) recording for session (multiframe) recording. Only used if starting session recording this frame.

Default: 0

sessionMaxUploadSeconds

Number

Inherited from Session-record (click for formatted description): app/mixins/session-record.js:89

Maximum time allowed for whole-session video upload before proceeding, in seconds. Can be overridden by researcher, based on tradeoff between making families wait and losing data.

Default: 10

showPreviousButton

Boolean

[Only used if not autoProceed] Whether to show a previous button to allow the participant to go to the previous frame

Default: true

showProgressBar

Boolean

[Only used if durationSeconds set] Whether to show a progress bar based on durationSeconds in the parent text area.

Default: false

showReplayButton

Boolean

[Only used if not autoProceed AND if there is audio] Whether to show a replay button to allow the participant to replay the audio

Default: false

showWaitForRecordingMessage

Boolean

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:191

Whether to initially show a message saying to wait until recording starts, covering the entire frame. This prevents participants from seeing any stimuli before recording begins. Only used if recording is being started immediately.

Default: true

showWaitForUploadMessage

Boolean

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:218

Whether to stop media and hide stimuli with a message saying to wait for video upload when stopping recording. Do NOT set this to true if end of recording does not correspond to end of the frame (e.g. during consent or observation frames) since it will hide everything upon stopping the recording!

Default: true

startRecordingAutomatically

Boolean

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:173

Whether to start recording ASAP (only applies if doUseCamera). Consuming frame should set to override if needed.

Default: false

startSessionRecording

Number

Inherited from Session-record (click for formatted description): app/mixins/session-record.js:82

Whether to start a session (multi-frame) recording as soon as possible upon loading this frame. This allows you to conduct video recording across multiple frames, simply specifying which frame to start and end on. Individual frames may also provide frame-specific recording capabilities; it is best NOT to conduct both a multiframe 'session' recording and frame-specific recording simultaneously as multiple video streams will eat up bandwidth. If you decide to use session recording, turn off recording for any frames that would otherwise record. There can be multiple session recordings in an experiment, e.g. from frames 1-3 and 5-10.

Default: false

stoppedRecording

Boolean private

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:108

Whether recording is stopped already, meaning it doesn't need to be re-stopped when destroying frame. This should be set to true by the consuming frame when video is stopped.

videoId

String private

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:181

A video ID to use for the current recording. Format is videoStream_<experimentId>_<frameId>_<sessionId>_timestampMS_RRR where RRR are random numeric digits.

videoList

List private

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:100

A list of all video IDs used in this mixin (a new one is created for each recording). Accessible to consuming frame.

videoTypes

String[]

Inherited from Expand-assets (click for formatted description): app/mixins/expand-assets.js:154

List of video types to expect for any audio specified just with a string rather than with a list of src/type objects. If videoTypes is ['typeA', 'typeB'] and a video source is given as intro, the video source will be expanded out to [ { src: 'baseDir' + 'typeA/intro.typeA', type: 'video/typeA' }, { src: 'baseDir' + 'typeB/intro.typeB', type: 'video/typeB' } ]

Default: ['mp4', 'webm']

waitForRecordingMessage

Boolean

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:200

[Only used if showWaitForRecordingMessage is true] Text to display while waiting for recording to begin.

Default: 'Please wait... <br><br> starting webcam recording'

waitForRecordingMessageColor

Boolean

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:207

[Only used if showWaitForRecordingMessage is true] Background color of screen while waiting for recording to begin. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value for acceptable syntax: can use either color names ('blue', 'red', 'green', etc.), or rgb hex values (e.g. '#800080' - include the '#'). The text on top of this will be either black or white depending on which will have higher contrast.

Default: 'white'

waitForUploadMessage

Boolean

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:227

[Only used if showWaitForUploadMessage is true] Text to display while waiting for recording to begin.

Default: 'Please wait... <br><br> uploading video'

waitForUploadMessageColor

String

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:234

[Only used if showWaitForUploadMessage is true] Background color of screen while waiting for recording to upload. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value for acceptable syntax: can use either color names ('blue', 'red', 'green', etc.), or rgb hex values (e.g. '#800080' - include the '#'). The text on top of this will be either black or white depending on which will have higher contrast.

Default: 'white'

waitForWebcamImage

String

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:245

[Only used if showWaitForUploadMessage and/or showWaitForRecordingMessage are true] Image to display along with any wait-for-recording or wait-for-upload message. Either waitForWebcamImage or waitForWebcamVideo can be specified. This can be either a full URL ('https://...') or just a filename, which will be assumed to be inside `baseDir/img/ if this frame otherwise supports use of baseDir`.

Default: ''

waitForWebcamVideo

String

Inherited from Video-record (click for formatted description): app/mixins/video-record.js:255

[Only used if showWaitForUploadMessage and/or showWaitForRecordingMessage are true] Video to display along with any wait-for-recording or wait-for-upload message (looping). Either waitForWebcamImage or waitForWebcamVideo can be specified. This can be either an array of `{'src': 'https://...', 'type': '...'}` objects (e.g. providing both webm and mp4 versions at specified URLS) or a single string relative to `baseDir/<EXT>/` if this frame otherwise supports use of `baseDir`.

Default: ''

Data keys collected

These are the fields that will be captured by this frame and sent back to the Lookit server. Each of these fields will correspond to one row of the CSV frame data for a given response - the row will have key set to the data key name, and value set to the value for this response. Equivalently, this data will be available in the exp_data field of the response JSON data.

audioPlayed

String

Source URL of audio played, if any. If multiple sources provided (e.g. mp4 and ogg versions) just the first is stored.

correctImageSelected

Boolean

Whether image selected at time of proceeding is marked as correct

eventTimings

Ordered list of events captured during this frame (oldest to newest). Each event is represented as an object with at least the properties {'eventType': EVENTNAME, 'timestamp': TIMESTAMP}. See Events tab for details of events that might be captured.

frameDuration

Duration between frame being inserted and call to next

frameType

Type of frame: EXIT (exit survey), CONSENT (consent or assent frame), or DEFAULT (anything else)

generatedProperties

Any properties generated via a custom generateProperties function provided to this frame (e.g., a score you computed to decide on feedback). In general will be null.

images

Array

Array of images used in this frame [same as passed to this frame, but may reflect random assignment for this particular participant]

selectedImage

String

ID of image selected at time of proceeding

totalLookingTime

Number
Total looking time during this frame, in seconds. Looking time is calculated as the total time spent looking between: (1) The start of the parent control period, or the first look during that period if the child is not looking initially and (2) The end of the trial due to the parent pushing the end trial key, the child reaching the lookaway criterion, or the frame being completed without either of these happening (e.g., a video is played N times or an image is shown for N seconds). All time spent looking away, per parent coding, is excluded, regardless of the duration of the lookaway. This value will be null if the trial is not completed by any of the above mechanisms, for instance because the parent ends the study early during this frame.

trialEndReason

String
What caused the trial to end: 'lookaway' (the child reached the lookaway threshold), 'parentEnded' (the parent pressed the endTrialKey), or 'ceiling' (the frame ended without either of those happening). This value will be null if the trial is not completed by any of the above mechanisms, for instance because the parent ends the study early during this frame.

Events

clickImage

When one of the image options is clicked during a choice frame

Event Payload:

  • imageId String

    ID of the image selected

  • correct Boolean

    whether this image is marked as correct

dismissFeedback

When the participant dismisses a feedback dialogue

Event Payload:

displayAllImages

When images are displayed to participant (for images without any delay added)

displayImage

When a specific image is shown at a delay.

Event Payload:

endTimer

Timer for set-duration trial ends

enteredFullscreen

Inherited from Full-screen but overwritten in app/mixins/full-screen.js:84

Upon detecting change to fullscreen mode

failedToStartAudio

When main audio cannot be started. In this case we treat it as if the audio was completed (for purposes of allowing participant to proceed)

failedToStartImageAudio

When image/feedback audio cannot be started. In this case we treat it as if the audio was completed (for purposes of allowing participant to proceed)

Event Payload:

finishAudio

When main audio segment finishes playing

hasCamAccess

Inherited from Session-record but overwritten in app/mixins/video-record.js:57

When recorder detects a change in camera access

Event Payload:

leftFullscreen

Inherited from Full-screen but overwritten in app/mixins/full-screen.js:96

Upon detecting change out of fullscreen mode

lookawayEnd

When parent records a lookaway ending. This will NOT be triggered at the start of this frame if the parent is not holding down the lookawayKey, only when the key is actually released. Lookaways are recorded regardless of whether the parent control period has started.

lookawayEndedTrial

When trial ends due to lookaway criterion being reached.

lookawayStart

When parent records a lookaway starting. This will be triggered at the start of this frame if the parent is already holding down the lookawayKey, and otherwise only when the key is newly pressed down. Lookaways are recorded regardless of whether the parent control period has started.

nextFrame

Move to next frame

parentControlPeriodEnd

When interval of parent control of trial ends - i.e., lookaways cannot lead to ending trial, parent cannot press key to end trial.

parentControlPeriodStart

When interval of parent control of trial begins - i.e., lookaways begin counting up to threshold. Lookaway events are recorded throughout, but do not count towards ending trial until parent control period begins.

parentEndedTrial

When trial ends due to parent pressing key to end trial

pauseVideo

When pausing study, immediately before request to pause webcam recording

previousFrame

Move to previous frame

recorderReady

When video recorder has been installed

replayAudio

When main audio segment is replayed

sessionRecorderReady

When session video recorder has been installed

startAudio

When main audio segment starts playing

startImageAudio

When image/feedback audio is started

Event Payload:

startSessionRecording

When session video recorder has begun recording

startTimer

Timer for set-duration trial begins

stoppingCapture

Inherited from Session-record but overwritten in app/mixins/video-record.js:84

Just before stopping webcam video capture

stopSessionRecording

When session video recorder is stopped (upload may continue afterwards)

trialComplete

Trial is complete and attempting to move to next frame; may wait for recording to catch up before proceeding.

unpauseVideo

When unpausing study, immediately before request to resume webcam recording

videoStreamConnection

Inherited from Session-record but overwritten in app/mixins/video-record.js:64

When recorder detects a change in video stream connection status

Event Payload:

  • status String

    status of video stream connection, e.g. 'NetConnection.Connect.Success' if successful