Skip to content

Commit

Permalink
allow making watching instructions video optional; minor formatting f…
Browse files Browse the repository at this point in the history
…ixes for docs
  • Loading branch information
Kim Scott committed Nov 9, 2020
1 parent 641426d commit 5443682
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
3 changes: 1 addition & 2 deletions app/components/exp-lookit-images-audio/doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ doRecording [Boolean]
connection before starting audio or showing images if so)

autoProceed [Boolean | ``false``]

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
Expand Down Expand Up @@ -581,4 +580,4 @@ The events recorded specifically by this frame are:

:dismissFeedback: When the participant dismisses a feedback dialogue

:imageId: [String] ID of the associated image
:imageId: [String] ID of the associated image
12 changes: 9 additions & 3 deletions app/components/exp-lookit-instruction-video/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,14 @@ export default ExpFrameBaseComponent.extend(ExpandAssets, {
default: 'Welcome! Please watch this video to learn how the study will work. You can read the transcript to the right if you prefer.'
},

requireWatchOrRead: {
type: 'Boolean',
description: 'Whether to require that the participant watches the video (or reads the whole transcript) to move on'
},

/**
* Text to show above Next button if participant has not yet watched video or read transcript
* Text to show above Next button if participant has not yet watched video or read transcript. Only used if
* requireWatchOrRead is true.
*
* @property {String} warningText
* @default 'Please watch the video or read the transcript before proceeding.'
Expand Down Expand Up @@ -245,8 +251,8 @@ export default ExpFrameBaseComponent.extend(ExpandAssets, {
}
},

hasCompletedFrame: Em.computed('playedVideo', 'readTranscript', function() {
return (this.get('playedVideo') || this.get('readTranscript'));
hasCompletedFrame: Em.computed('playedVideo', 'readTranscript', 'requireWatchOrRead', function() {
return (!this.get('requireWatchOrRead') || this.get('playedVideo') || this.get('readTranscript'));
}),

showWarning: false,
Expand Down
4 changes: 4 additions & 0 deletions app/components/exp-lookit-instruction-video/doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ transcriptBlocks [Array]
:src: [String] URL of image
:alt: [String] Alt text for image

requireWatchOrRead [Boolean | ``true``]
Whether to require that the participant watches the whole video (or reads the whole transcript) to move on.
Set to false for e.g. a debriefing video where it's optional to review the information.

showPreviousButton [Boolean | ``true``]
Whether to show a 'previous' button

Expand Down
6 changes: 2 additions & 4 deletions app/components/exp-video-config/doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ This frame shows a friendly message offering tech support by the lab via phone.
"video-config": {
"kind": "exp-video-config",
"troubleshootingIntro": "If you're having any trouble getting your webcam set up,
please feel free to call the XYZ lab at (123) 456-7890 and we'd be glad to
help you out!"
"troubleshootingIntro": "If you're having any trouble getting your webcam set up, please feel free to call the XYZ lab at (123) 456-7890 and we'd be glad to help you out!"
}
Expand All @@ -72,4 +70,4 @@ Events recorded

The events recorded specifically by this frame are:

<None>>
<None>>

0 comments on commit 5443682

Please sign in to comment.