Skip to content

Commit

Permalink
Merge pull request #177 from lookit/develop
Browse files Browse the repository at this point in the history
v1.3.1 Minor fixes including for backgroundColor on exp-lookit-video frame
  • Loading branch information
Kim Scott authored Oct 31, 2020
2 parents d486262 + 8949c03 commit 2f7b9ed
Show file tree
Hide file tree
Showing 51 changed files with 2,081 additions and 192 deletions.
66 changes: 66 additions & 0 deletions app/components/consent-template004/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<div class="center-text">
<span class="exp-text-medium">
Consent to participate in research: {{experiment.name}}
</span>
</div>

<br>
<div class="video-consent-body">

<p> Researchers led by {{PIName}} at {{institution}} are running this study, "{{experiment.name}}," on Lookit. </p>

<p class="exp-text-medium"> Purpose </p>
<p> {{purpose}} </p>

<p class="exp-text-medium"> Procedures </p>
<p> This study takes about {{experiment.duration}} to complete. {{procedures}} </p>

<p class="exp-text-medium"> Participation </p>
<p> You and your child are free to choose whether to be in this study. If you and your child choose to participate, it's okay to stop at any point during the session. Please pause or stop the session if your child becomes very fussy or does not want to participate! If this is a study with multiple sessions, it's okay not to complete all the sessions.</p>

<p class="exp-text-medium"> Benefits, risks, and payment </p>
<p> {{payment}} </p>

<p class="exp-text-medium"> Data collection and webcam recording </p>
<p>During the session, you and your child will be recorded via your computer's webcam and microphone. At the end of the session, you will be prompted to choose a privacy level for your webcam recordings. You will have the option to withdraw your video data at this point. Video recordings and other data you enter are sent securely to the Lookit platform and stored indefinitely. You can view your past recordings on Lookit under "Studies" -> "Your past studies" at any time.</p>
<p>Data is stored securely on Lookit servers and by researchers. However, there is always a small risk that data transmitted over the internet may be intercepted or that the security of stored data may be compromised.</p>
<p>No video clips will be published or shared unless you allow this when selecting a privacy level. If we do not receive a consent recording (the video you'll make to the right) for this session and cannot verify that you agreed to participate, no other video from your session will be viewed.</p>


<p class="exp-text-medium"> Use of data by study researchers </p>
<p>The research group led by {{PIName}} at {{institution}} will have access to video and other data collected during this session. We will also have access to your account profile, demographic survey, and the child profile for the child who is participating, including changes you make in the future to any of this information. We may study your child's responses in connection with his or her previous responses to this or other studies run by our group, siblings' responses to this or other studies run by our group, or demographic survey responses.</p>
{{#if datause}}
<p>
{{datause}}
</p>
{{/if}}

<p class="exp-text-medium"> Use of data by Lookit </p>
<p> Because this study is being run on the Lookit platform, researchers working on the Lookit project at MIT will also have access to the data collected during this session, in addition to your account data, child profiles, and demographic survey responses. This data may be used by Lookit to detect and fix technical problems or identify new features that would be helpful; provide support to study researchers; assess data quality (for instance, how well an observer can tell which direction children are looking); evaluate the site's success in reaching a diverse population; and characterize family engagement (for instance, looking at what aspects of a study make parents more interested in coming back later). </p>

<p class="exp-text-medium"> Publication of results </p>
<p> The results of the research may be presented at scientific meetings or published in scientific journals. Raw data (for instance, looking times to the left and right of the screen) may be published when it cannot identify children. We never publish children's birthdates or names, and we never publish your demographic data in conjunction with your child's video. </p>

{{#if additional_segments}}
{{#each additional_segments as |segment|}}
<p class="exp-text-medium"> {{segment.title}} </p>
<p> {{exp-format segment.text}} </p>
{{/each}}
{{/if}}

<p class="exp-text-medium"> Rights of research subjects </p>
<p> {{research_rights_statement}} </p>

{{#if gdpr}}
<p class="exp-text-medium"> General Data Protection Regulation (GDPR) information </p>
<p> As part of your participation, we will collect certain personal information about you, including: {{gdpr_personal_data}}. In addition, we will collect special category data, your personal information that is especially sensitive: {{gdpr_sensitive_data}}</p>

<p>Your personal information will be transferred to the United States. You understand that the data protection and privacy laws of the United States may not offer you the same level of protection as those in your country of origin.</p>
{{/if}}


<p class="exp-text-medium"> Researcher contact information </p>
<p> This study is run by {{PIName}} at {{institution}}. If you or your child have any questions or concerns about this study, or in the very unlikely event of a research-related injury, please contact {{PIContact}}. </p>
<p>If you or your child have any questions or concerns about the Lookit platform, please contact Kim Scott at [email protected] or 617 324 4859.</p>

</div>
3 changes: 3 additions & 0 deletions app/components/exp-frame-base/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export default Ember.Component.extend(FullScreen, SessionRecord, {
id: null,
kind: null,

classNames: ['lookit-frame'],

extra: {},

mergedProperties: ['frameSchemaProperties'],
Expand Down Expand Up @@ -628,6 +630,7 @@ export default Ember.Component.extend(FullScreen, SessionRecord, {
// being triggered as part of standard frame operation or as an override to a frame
// that is not typically fullscreen. In latter case, keep formatting as close to
// before as possible, to enable forms etc. to work ok in fullscreen mode.

Ember.$('*').removeClass('player-fullscreen');
Ember.$('*').removeClass('player-fullscreen-override');
Ember.$('#application-parse-error-text').hide();
Expand Down
2 changes: 0 additions & 2 deletions app/components/exp-lookit-calibration/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ export default ExpFrameBaseComponent.extend(FullScreen, MediaReload, VideoRecord
}),

onRecordingStarted() {
$('#waitForVideo').hide();
this.startCalibration();
},

Expand All @@ -370,7 +369,6 @@ export default ExpFrameBaseComponent.extend(FullScreen, MediaReload, VideoRecord
$('#calibration-image').addClass(this.get('calibrationImageAnimation'));
}
if (!(this.get('doRecording') || this.get('startSessionRecording'))) {
$('#waitForVideo').hide();
this.startCalibration();
}
},
Expand Down
2 changes: 1 addition & 1 deletion app/components/exp-lookit-calibration/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
</div>

{{#if (or doRecording startSessionRecording)}}
{{#if startSessionRecording}}
<p id="waitForVideo"> establishing video connection <br> please wait... </p>
{{/if}}

Expand Down
6 changes: 4 additions & 2 deletions app/components/exp-lookit-composite-video-trial/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ let {

/**
* @module exp-player
* @submodule frames
* @submodule frames-deprecated
*/

/**
* Composite video display for typical looking measures trials (e.g. preferential looking,
* looking time). (Previously called exp-lookit-video.)
* looking time). (Previously called exp-lookit-video.) This is deprecated and will not be
* included in release 2.x. For new studies, use {{#crossLink "Exp-lookit-video"}}{{/crossLink}} instead.
*
* Trial consists of four phases, each of which is optional.
*
Expand Down Expand Up @@ -109,6 +110,7 @@ let {
* @uses Media-reload
* @uses Video-record
* @uses Expand-assets
* @deprecated
*/

export default ExpFrameBaseComponent.extend(FullScreen, MediaReload, VideoRecord, ExpandAssets, {
Expand Down
1 change: 0 additions & 1 deletion app/components/exp-lookit-dialogue-page/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ export default ExpFrameBaseComponent.extend(FullScreen, VideoRecord, ExpandAsset

// Override to do a bit extra when starting recording
onRecordingStarted() {
$('#waitForVideo').hide();
this.set('currentAudioIndex', -1);
this.send('playNextAudioSegment');
},
Expand Down
2 changes: 1 addition & 1 deletion app/components/exp-lookit-dialogue-page/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>

<div id="story-area">
{{#if (or startSessionRecording doRecording)}}
{{#if startSessionRecording}}
<p id="waitForVideo"> establishing video connection <br> please wait... </p>
{{/if}}

Expand Down
1 change: 1 addition & 0 deletions app/components/exp-lookit-exit-survey/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export default ExpFrameBaseComponent.extend(Validations, FullScreen, {
this._save()
.then(()=> {
this.set('section1', false);
window.scrollTo(0, 0);
})
.catch(err => this.displayError(err));
},
Expand Down
155 changes: 155 additions & 0 deletions app/components/exp-lookit-images-audio-infant-control/component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
import ExpLookitImagesAudio from '../exp-lookit-images-audio/component';
import InfantControlledTiming from '../../mixins/infant-controlled-timing';

/**
* @module exp-player
* @submodule frames
*/

/**
* Infant-controlled version of the {{#crossLink "Exp-lookit-images-audio"}}{{/crossLink}} 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:
*
```json
"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"
]
}
* ```
* @class Exp-lookit-images-audio-infant-control
* @extends Exp-lookit-images-audio
* @uses Infant-controlled-timing
*/


export default ExpLookitImagesAudio.extend(InfantControlledTiming, {

meta: {
data: {
type: 'object',
properties: {
videoId: {
type: 'string'
},
videoList: {
type: 'list'
},
images: {
type: 'array'
},
audioPlayed: {
type: 'string'
},
selectedImage: {
type: 'string'
},
correctImageSelected: {
type: 'string'
},
totalLookingTime: {
type: 'number'
},
trialEndReason: {
type: 'string'
}
},
}
},

finish() {
this.endParentControl();
this._super(...arguments);
},

startTrial() {
this._super(...arguments);
this.startParentControl();
},

checkAndEnableProceed() {
let ready = this._super(...arguments);
if (ready) {
this.set('trialEndReason', 'ceiling');
this.setTrialEndTime();
}
return ready;
},

onLookawayCriterion() {
this.readyToFinish();
}

});
Loading

0 comments on commit 2f7b9ed

Please sign in to comment.