Exp-lookit-instructions Class
These docs have moved here.A frame to display instructions to the user. The user's webcam may optionally be displayed, and audio and video clips may be included in the instructions (and may be required to be played before moving on).
Each element of the 'blocks' parameter is rendered using Exp-text-block.
"frames": {
"instructions": {
"kind": "exp-lookit-instructions",
"blocks": [
{
"title": "Parent's role",
"listblocks": [
{
"text": "Follow instructions"
},
{
"text": "Only do each joke once"
}
]
},
{
"text": "It's important that we can see you",
"image": {
"alt": "Father holding child looking over his shoulder",
"src": "https://s3.amazonaws.com/lookitcontents/exp-physics/OverShoulder.jpg"
},
"title": "Camera position"
},
{
"text": "Here's some audio you have to play",
"title": "Test",
"mediaBlock": {
"text": "You should hear 'Ready to go?'",
"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."
}
},
{
"text": "Here's a video you don't have to play!",
"title": "Test",
"mediaBlock": {
"text": "Look at that.",
"isVideo": true,
"sources": [
{
"src": "https://s3.amazonaws.com/lookitcontents/exp-physics-final/examples/7_control_same.mp4",
"type": "video/mp4"
},
{
"src": "https://s3.amazonaws.com/lookitcontents/exp-physics-final/examples/7_control_same.webm",
"type": "video/webm"
}
],
"mustPlay": false
}
}
],
"showWebcam": true,
"webcamBlocks": [
{
"title": "Some webcam instructions",
"listblocks": [
{
"text": "Like this!"
},
{
"text": "Be careful your webcam does not have tape over it"
}
]
}
],
"nextButtonText": "Next"
}
}
Item Index
Methods
Properties
- audioOnly
- autosave
- blocks
- blocks
- doUseCamera
- maxRecordingLength
- maxUploadSeconds
- nextButtonText
- recorder
- recorderElement
- recorderReady
- showPreviousButton
- showWaitForRecordingMessage
- showWaitForUploadMessage
- showWebcam
- startRecordingAutomatically
- stoppedRecording
- videoId
- videoList
- waitForRecordingMessage
- waitForRecordingMessageColor
- waitForUploadMessage
- waitForUploadMessageColor
- waitForWebcamImage
- waitForWebcamVideo
Methods
destroyRecorder
()
hideRecorder
()
makeTimeEvent
-
eventName
-
extra
Returns:
Event data object
onRecordingStarted
()
setupRecorder
-
element
Parameters:
-
element
NodeA DOM node representing where to mount the recorder
Returns:
showRecorder
()
startRecorder
()
Returns:
stopRecorder
()
Returns:
whenPossibleToRecordObserver
()
Properties
audioOnly
Number
Default: 0
autosave
Number
private
Default: 1
blocks
Object[]
Array of objects specifying text/images of instructions to display under webcam view (if webcam is shown)
Sub-properties:
blocks
Object[]
Array of blocks for Exp-text-block, specifying text/images of instructions to display
Sub-properties:
-
title
StringTitle of this section
-
text
StringParagraph 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.
-
mediaBlock
ObjectObject specifying audio or video clip to include (optional). mediaBlock should be of form: {title: 'title text to show above audio', text: 'text to show below controls', warningText: 'Text to show in red if user tries to proceed but hasn't played; only used if mustPlay is true', sources: 'sources Array of {src: 'url', type: 'MIMEtype'} objects specifying audio sources', isVideo: 'boolean, whether video or audio', mustPlay: 'boolean, whether clip has to be played to proceed'}
doUseCamera
Boolean
Default: true
maxRecordingLength
Number
Default: 7200
maxUploadSeconds
Number
Default: 5
nextButtonText
String
Text to display on the 'next frame' button
Default: 'Start the videos! \n (You\'ll have a moment to turn around.)'
recorder
VideoRecorder
private
recorderReady
Boolean
private
startRecordingAutomatically
Boolean
Default: false
stoppedRecording
Boolean
private
videoId
String
private
videoStream_<experimentId>_<frameId>_<sessionId>_timestampMS_RRR
where RRR are random numeric digits.
videoList
List
private
Events
pauseVideo
recorderReady
stoppingCapture
unpauseVideo
videoStreamConnection
Event Payload:
-
status
Stringstatus of video stream connection, e.g. 'NetConnection.Connect.Success' if successful