Skip to content

Photo Response

A photo response allows participants to take a picture with a webcam connected to their laptop or desktop (if available) or the built-in front-facing camera on their mobile devices. Participants can always retake the picture for an unlimited number of times until they are satisified with the result.

Required Properties

type

  • Definition: The type of response.
  • Possible values: For a photo response, "type" must be specified as "photo".
1
2
3
{
  "type": "photo"
}

Optional Properties

duration_timer

  • Definition: Whether to show a duration timer that indicates the time elapsed since the reponse becomes visible.
  • Possible values: true,false
  • Default: false

1
2
3
4
{
  "type": "photo",
  "duration_timer": true
}
This will allow the participant to see the time elapsed since the response became visible to them.

duration_timer_onset

Dependencies

Requires duration_timer to be set to "true".

  • Definition: When to show the duration timer. When set to "start", the timer will appear as soon as the response is displayed and animate a stopwatch effect. When set to "end", the duration timer will only appear once the participant has made a reponse with no stopwatch effect.
  • Possible values: "start", "end"
  • Default: start

1
2
3
4
5
{
  "type": "photo",
  "duration_timer": true,
  "duration_timer_onset": "start"
}
This will allow the participant to see how much time has elapsed since the response became visible to them in the form of a stopwatch.

frame_rate

  • Definition: The frame rate at which the view finder refreshes itself.
  • Possible values: any integer
  • Default: 30

    Default Frame Rate

    The default value of 30 means that the view finder will refresh 30 times per second to ensure smooth motion in the camera feed. We do not recommed changing this value unless motivated by your experimental design: setting it to a value too low will cause stuttering in the view finder, making it difficult to take a clear picture; setting it to a value too high will unnecessarily tax the participant's computer, potentially resulting in idiosyncratic technical problems.

1
2
3
4
{
  "type": "photo",
  "frame_rate": 25
}
The above code will cause the view finder to refresh 25 times per second.

height

  • Definition: The height of the view finder in pixels, which will also be the height of the image saved in your session data.
  • Possible values: any numeric value followed by the "px" unit (e.g., "20px")
  • Default: auto

    Note

    The default auto means that the height will be adaptive to the device that the participant is using. If your study will run on multiple devices (including mobile devices), it is highly recommended to leave this at its default auto setting.

  • See also: width

1
2
3
4
{
  "type": "photo",
  "height": "20px"
}
This example code would produce a view finder that is 20 pixels in height.

instruction

  • Definition: A short text providing instructions for participants about the current response.
  • Possible values: Any text
  • Default: A default instruction does not exist for the photo response, as its interface is already highly intuitive. You can however add a custom instruction by setting this property to any desired text.

1
2
3
4
{
  "type": "photo",
  "instruction": "The text in these quotation marks will be displayed."
}
This will display the content in quotations as written instructions for the participant.

mirror_mode

  • Definition: Whether or not to use a mirror image in the view finder (how the participants see themselves).
  • Possible values: true,false
  • Default: true

    Note

    The defualt true means the mirror image will be used even if you do not add in this property. Most video chat software displays camera images in the mirror mode, so we highly recommend not changing this setting unless motivated by your experimental design.

1
2
3
4
{
  "type": "photo",
  "mirror_mode": false
}
Unlike the default, the above code will prevent the participant's image from being mirrored.

width

  • Definition: The width of the view finder in pixels, which will also be the width of the image saved in your session data.
  • Possible values: any numeric value followed by the "px" unit (e.g., "20px")
  • Default: auto

    Note

    The default auto means that the width will be adaptive to the device that the participant is using. If your study will run on multiple devices (including mobile devices), it is highly recommended to leave this at its default auto setting.

  • See also: height

1
2
3
4
{
  "type": "photo",
  "width": "40px"
}
This example code would produce a view finder that is 40 pixels wide.

Recorded Data

  • value: the name of the image file that is saved; this image file is included in the downloadable zip archive containing your participant data.
  • rt: the time in milliseconds that participants take to snap the picture.