@lookit/record 1.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import Handlebars from "handlebars";
1
+ import chsTemplates from "@lookit/templates";
2
2
  import { JsPsych, JsPsychPlugin, ParameterType, TrialType } from "jspsych";
3
- import video_config from "../hbs/video-config.hbs";
3
+ import checkmarkIcon from "../img/checkmark-icon.png";
4
4
  import chromeInitialPrompt from "../img/chrome_initialprompt.png";
5
5
  import chromeAlwaysAllow from "../img/chrome_step1_alwaysallow.png";
6
6
  import chromePermissions from "../img/chrome_step1_permissions.png";
@@ -16,6 +16,7 @@ const info = <const>{
16
16
  name: "video-config-plugin",
17
17
  version: version,
18
18
  parameters: {
19
+ locale: { type: ParameterType.STRING, default: "en-us" },
19
20
  troubleshooting_intro: {
20
21
  /**
21
22
  * Optional string to appear at the start of the "Setup tips and
@@ -50,6 +51,31 @@ interface MediaDeviceInfo {
50
51
  groupId: string;
51
52
  }
52
53
 
54
+ export const html_params = {
55
+ webcam_container_id: "lookit-jspsych-webcam-container",
56
+ reload_button_id_text: "lookit-jspsych-reload-webcam",
57
+ reload_button_id_cam: "lookit-jspsych-reload-cam-mic",
58
+ camera_selection_id: "lookit-jspsych-which-webcam",
59
+ mic_selection_id: "lookit-jspsych-which-mic",
60
+ next_button_id: "lookit-jspsych-next",
61
+ error_msg_div_id: "lookit-jspsych-video-config-errors",
62
+ step1_id: "lookit-jspsych-step1",
63
+ step2_id: "lookit-jspsych-step2",
64
+ step3_id: "lookit-jspsych-step3",
65
+ step_complete_class: "lookit-jspsych-step-complete",
66
+ waiting_for_access_msg_id: "lookit-jspsych-waiting-for-access",
67
+ checking_mic_msg_id: "lookit-jspsych-checking-mic",
68
+ access_problem_msg_id: "lookit-jspsych-access-problem",
69
+ setup_problem_msg_id: "lookit-jspsych-setup-problem",
70
+ chromeInitialPrompt,
71
+ chromeAlwaysAllow,
72
+ chromePermissions,
73
+ firefoxInitialPrompt,
74
+ firefoxChooseDevice,
75
+ firefoxDevicesBlocked,
76
+ checkmarkIcon,
77
+ };
78
+
53
79
  /**
54
80
  * **Video Config**.
55
81
  *
@@ -73,26 +99,6 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
73
99
  private minVolume: number = 0.1;
74
100
  private micChecked: boolean = false;
75
101
  private processorNode: AudioWorkletNode | null = null;
76
- // HTML IDs and classes
77
- private webcam_container_id: string = "lookit-jspsych-webcam-container";
78
- private reload_button_id_text: string = "lookit-jspsych-reload-webcam";
79
- private reload_button_id_cam: string = "lookit-jspsych-reload-cam-mic";
80
- private camera_selection_id: string = "lookit-jspsych-which-webcam";
81
- private mic_selection_id: string = "lookit-jspsych-which-mic";
82
- private next_button_id: string = "lookit-jspsych-next";
83
- private error_msg_div_id: string = "lookit-jspsych-video-config-errors";
84
- private step1_id: string = "lookit-jspsych-step1";
85
- private step2_id: string = "lookit-jspsych-step2";
86
- private step3_id: string = "lookit-jspsych-step3";
87
- private step_complete_class: string = "lookit-jspsych-step-complete";
88
- // info/error messages
89
- private step_complete_text: string = "Done!";
90
- private waiting_for_access_msg: string = "Waiting for camera/mic access...";
91
- private checking_mic_msg: string = "Checking mic input...";
92
- private access_problem_msg: string =
93
- "There was a problem accessing your media devices.";
94
- private setup_problem_msg: string =
95
- "There was a problem setting up your camera and mic.";
96
102
 
97
103
  /**
98
104
  * Constructor for video config plugin.
@@ -112,7 +118,7 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
112
118
  // Set up the event listener for device changes.
113
119
  navigator.mediaDevices.ondevicechange = this.onDeviceChange;
114
120
  // Add page content.
115
- this.addHtmlContent(trial.troubleshooting_intro as string);
121
+ this.addHtmlContent(trial);
116
122
  // Add event listeners after elements have been added to the page.
117
123
  this.addEventListeners();
118
124
  // Begin the initial recorder setup steps.
@@ -124,44 +130,23 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
124
130
  /**
125
131
  * Add HTML content to the page.
126
132
  *
127
- * @param troubleshooting_intro - Troubleshooting intro parameter from the
128
- * Trial object.
133
+ * @param trial - Trial object.
129
134
  */
130
- private addHtmlContent = (troubleshooting_intro: string) => {
131
- const html_params = {
132
- webcam_container_id: this.webcam_container_id,
133
- reload_button_id_cam: this.reload_button_id_cam,
134
- camera_selection_id: this.camera_selection_id,
135
- mic_selection_id: this.mic_selection_id,
136
- step1_id: this.step1_id,
137
- step2_id: this.step2_id,
138
- step3_id: this.step3_id,
139
- step_complete_class: this.step_complete_class,
140
- step_complete_text: this.step_complete_text,
141
- reload_button_id_text: this.reload_button_id_text,
142
- next_button_id: this.next_button_id,
143
- chromeInitialPrompt,
144
- chromeAlwaysAllow,
145
- chromePermissions,
146
- firefoxInitialPrompt,
147
- firefoxChooseDevice,
148
- firefoxDevicesBlocked,
149
- troubleshooting_intro,
150
- };
151
- this.display_el!.innerHTML = Handlebars.compile(video_config)(html_params);
135
+ private addHtmlContent = (trial: VideoConsentTrialType) => {
136
+ this.display_el!.innerHTML = chsTemplates.videoConfig(trial, html_params);
152
137
  };
153
138
 
154
139
  /** Add event listeners to elements after they've been added to the page. */
155
140
  private addEventListeners = () => {
156
141
  // Next button.
157
142
  const next_button_el = this.display_el?.querySelector(
158
- `#${this.next_button_id}`,
143
+ `#${html_params.next_button_id}`,
159
144
  ) as HTMLButtonElement;
160
145
  next_button_el.addEventListener("click", this.nextButtonClick);
161
146
  // Reload buttons.
162
147
  (
163
148
  this.display_el?.querySelectorAll(
164
- `#${this.reload_button_id_cam}, #${this.reload_button_id_text}`,
149
+ `#${html_params.reload_button_id_cam}, #${html_params.reload_button_id_text}`,
165
150
  ) as NodeListOf<HTMLButtonElement>
166
151
  ).forEach((el) => el.addEventListener("click", this.reloadButtonClick));
167
152
  // Camera/mic selection elements.
@@ -211,9 +196,9 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
211
196
  // Don't reset step 2 (reload) because that should persist after being checked once with any Recorder/devices.
212
197
  this.updateInstructions(1, false);
213
198
  this.updateInstructions(3, false);
214
- this.updateErrors(this.waiting_for_access_msg);
199
+ this.updateErrors(html_params.waiting_for_access_msg_id);
215
200
  await this.requestPermission({ video: true, audio: true });
216
- this.updateErrors("");
201
+ this.updateErrors();
217
202
  await this.onDeviceChange();
218
203
  await this.setDevices();
219
204
  await this.runStreamChecks();
@@ -259,11 +244,11 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
259
244
  }) => {
260
245
  // Clear any existing options in select elements
261
246
  const cam_selection_el = this.display_el?.querySelector(
262
- `#${this.camera_selection_id}`,
247
+ `#${html_params.camera_selection_id}`,
263
248
  ) as HTMLSelectElement;
264
249
  cam_selection_el.innerHTML = "";
265
250
  const mic_selection_el = this.display_el?.querySelector(
266
- `#${this.mic_selection_id}`,
251
+ `#${html_params.mic_selection_id}`,
267
252
  ) as HTMLSelectElement;
268
253
  mic_selection_el.innerHTML = "";
269
254
  // Populate select elements with current device options.
@@ -299,13 +284,13 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
299
284
  // Get the devices selected from the drop-down element.
300
285
  const selected_cam: string = (
301
286
  this.display_el?.querySelector(
302
- `#${this.camera_selection_id}`,
287
+ `#${html_params.camera_selection_id}`,
303
288
  ) as HTMLSelectElement
304
289
  ).value;
305
290
  this.camId = selected_cam;
306
291
  const selected_mic: string = (
307
292
  this.display_el?.querySelector(
308
- `#${this.mic_selection_id}`,
293
+ `#${html_params.mic_selection_id}`,
309
294
  ) as HTMLSelectElement
310
295
  ).value;
311
296
  this.micId = selected_mic;
@@ -332,14 +317,14 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
332
317
  if (this.jsPsych.pluginAPI.getCameraRecorder() && this.recorder) {
333
318
  this.recorder.insertWebcamFeed(
334
319
  this.display_el?.querySelector(
335
- `#${this.webcam_container_id}`,
320
+ `#${html_params.webcam_container_id}`,
336
321
  ) as HTMLDivElement,
337
322
  );
338
323
  this.updateInstructions(1, true);
339
- this.updateErrors(this.checking_mic_msg);
324
+ this.updateErrors(html_params.checking_mic_msg_id);
340
325
  try {
341
326
  await this.checkMic();
342
- this.updateErrors("");
327
+ this.updateErrors();
343
328
  this.updateInstructions(3, true);
344
329
  // Allow user to continue (end trial) when all checks have passed.
345
330
  if (this.hasReloaded) {
@@ -347,11 +332,11 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
347
332
  }
348
333
  } catch (e) {
349
334
  console.warn(`${e}`);
350
- this.updateErrors(this.setup_problem_msg);
335
+ this.updateErrors(html_params.setup_problem_msg_id);
351
336
  throw new Error(`${e}`);
352
337
  }
353
338
  } else {
354
- this.updateErrors(this.access_problem_msg);
339
+ this.updateErrors(html_params.access_problem_msg_id);
355
340
  throw new NoStreamError();
356
341
  }
357
342
  };
@@ -553,15 +538,15 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
553
538
  let step_id = null;
554
539
  switch (step) {
555
540
  case 1: {
556
- step_id = this.step1_id;
541
+ step_id = html_params.step1_id;
557
542
  break;
558
543
  }
559
544
  case 2: {
560
- step_id = this.step2_id;
545
+ step_id = html_params.step2_id;
561
546
  break;
562
547
  }
563
548
  case 3: {
564
- step_id = this.step3_id;
549
+ step_id = html_params.step3_id;
565
550
  break;
566
551
  }
567
552
  }
@@ -586,14 +571,27 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
586
571
  * Update the errors/messages div with information for the user about the
587
572
  * camera/mic checks.
588
573
  *
589
- * @param errorMsg - Message to display in the error message div. Pass an
590
- * empty string to clear any existing errors/messages.
574
+ * @param errorMsgId - Span element ID containing the message to display in
575
+ * the error message div. Call the function without an errorMsgId to clear
576
+ * the errors.
591
577
  */
592
- private updateErrors = (errorMsg: string) => {
593
- const error_msg_div = this.display_el?.querySelector(
594
- `#${this.error_msg_div_id}`,
578
+ private updateErrors = (errorMsgId?: string) => {
579
+ const error_msg_container = this.display_el?.querySelector(
580
+ `#${html_params.error_msg_div_id}`,
595
581
  ) as HTMLDivElement;
596
- error_msg_div.innerHTML = errorMsg;
582
+ (
583
+ error_msg_container.querySelectorAll(
584
+ "span.error_msg",
585
+ ) as NodeListOf<HTMLSpanElement>
586
+ ).forEach((span) => {
587
+ span.style.display = "none";
588
+ });
589
+ if (errorMsgId) {
590
+ const error_msg_el = this.display_el?.querySelector(
591
+ `#${errorMsgId}`,
592
+ ) as HTMLSpanElement;
593
+ error_msg_el.style.display = "block";
594
+ }
597
595
  };
598
596
 
599
597
  /**
@@ -652,14 +650,14 @@ export default class VideoConfigPlugin implements JsPsychPlugin<Info> {
652
650
  */
653
651
  private enableNext = (enable: boolean) => {
654
652
  const next_button_el = this.display_el?.querySelector(
655
- `#${this.next_button_id}`,
653
+ `#${html_params.next_button_id}`,
656
654
  ) as HTMLButtonElement;
657
655
  if (enable) {
658
656
  next_button_el.disabled = false;
659
- next_button_el.classList.add(`${this.step_complete_class}`);
657
+ next_button_el.classList.add(`${html_params.step_complete_class}`);
660
658
  } else {
661
659
  next_button_el.disabled = true;
662
- next_button_el.classList.remove(`${this.step_complete_class}`);
660
+ next_button_el.classList.remove(`${html_params.step_complete_class}`);
663
661
  }
664
662
  };
665
663
  }
@@ -5,7 +5,7 @@ import {
5
5
  AudioWorkletNodeMock,
6
6
  } from "../fixtures/MockWebAudioAPI";
7
7
  import { MicCheckError, NoStreamError } from "./errors";
8
- import VideoConfigPlugin from "./video_config";
8
+ import VideoConfigPlugin from "./videoConfig";
9
9
 
10
10
  // The video config mic check relies on the WebAudio API, which is not available in Node/Jest/jsdom, so we'll mock it here.
11
11
  // This is in a separate file to avoid polluting the other test environments with the WebAudio API mocks.
@@ -1,370 +0,0 @@
1
- import { JsPsych, JsPsychPlugin, ParameterType, TrialType } from "jspsych";
2
- declare const info: {
3
- readonly name: "consent-video";
4
- readonly version: string;
5
- readonly parameters: {
6
- readonly template: {
7
- readonly type: ParameterType.STRING;
8
- readonly default: "consent-template-5";
9
- };
10
- readonly locale: {
11
- readonly type: ParameterType.STRING;
12
- readonly default: "en-us";
13
- };
14
- readonly additional_video_privacy_statement: {
15
- readonly type: ParameterType.STRING;
16
- readonly default: "";
17
- };
18
- readonly datause: {
19
- readonly type: ParameterType.STRING;
20
- readonly default: "";
21
- };
22
- readonly gdpr: {
23
- readonly type: ParameterType.BOOL;
24
- readonly default: false;
25
- };
26
- readonly gdpr_personal_data: {
27
- readonly type: ParameterType.STRING;
28
- readonly default: "";
29
- };
30
- readonly gdpr_sensitive_data: {
31
- readonly type: ParameterType.STRING;
32
- readonly default: "";
33
- };
34
- readonly PIName: {
35
- readonly type: ParameterType.STRING;
36
- readonly default: undefined;
37
- };
38
- readonly include_databrary: {
39
- readonly type: ParameterType.BOOL;
40
- readonly default: false;
41
- };
42
- readonly institution: {
43
- readonly type: ParameterType.STRING;
44
- readonly default: undefined;
45
- };
46
- readonly PIContact: {
47
- readonly type: ParameterType.STRING;
48
- readonly default: undefined;
49
- };
50
- readonly payment: {
51
- readonly type: ParameterType.STRING;
52
- readonly default: undefined;
53
- };
54
- readonly private_level_only: {
55
- readonly type: ParameterType.BOOL;
56
- readonly default: false;
57
- };
58
- readonly procedures: {
59
- readonly type: ParameterType.STRING;
60
- readonly default: undefined;
61
- };
62
- readonly purpose: {
63
- readonly type: ParameterType.STRING;
64
- readonly default: undefined;
65
- };
66
- readonly research_rights_statement: {
67
- readonly type: ParameterType.STRING;
68
- readonly default: "";
69
- };
70
- readonly risk_statement: {
71
- readonly type: ParameterType.STRING;
72
- readonly default: "";
73
- };
74
- readonly voluntary_participation: {
75
- readonly type: ParameterType.STRING;
76
- readonly default: "";
77
- };
78
- readonly purpose_header: {
79
- readonly type: ParameterType.STRING;
80
- readonly default: "";
81
- };
82
- readonly procedures_header: {
83
- readonly type: ParameterType.STRING;
84
- readonly default: "";
85
- };
86
- readonly participation_header: {
87
- readonly type: ParameterType.STRING;
88
- readonly default: "";
89
- };
90
- readonly benefits_header: {
91
- readonly type: ParameterType.STRING;
92
- readonly default: "";
93
- };
94
- readonly risk_header: {
95
- readonly type: ParameterType.STRING;
96
- readonly default: "";
97
- };
98
- readonly summary_statement: {
99
- readonly type: ParameterType.STRING;
100
- readonly default: "";
101
- };
102
- readonly additional_segments: {
103
- readonly type: ParameterType.COMPLEX;
104
- readonly array: true;
105
- readonly default: readonly [];
106
- readonly nested: {
107
- readonly title: {
108
- readonly type: ParameterType.STRING;
109
- readonly default: "";
110
- };
111
- readonly text: {
112
- readonly type: ParameterType.STRING;
113
- readonly default: "";
114
- };
115
- };
116
- };
117
- readonly prompt_all_adults: {
118
- readonly type: ParameterType.BOOL;
119
- readonly default: false;
120
- };
121
- readonly prompt_only_adults: {
122
- readonly type: ParameterType.BOOL;
123
- readonly default: false;
124
- };
125
- readonly consent_statement_text: {
126
- readonly type: ParameterType.STRING;
127
- readonly default: "";
128
- };
129
- readonly omit_injury_phrase: {
130
- readonly type: ParameterType.BOOL;
131
- readonly default: false;
132
- };
133
- };
134
- };
135
- type Info = typeof info;
136
- /** The video consent plugin. */
137
- export declare class VideoConsentPlugin implements JsPsychPlugin<Info> {
138
- private readonly jsPsych;
139
- static readonly info: {
140
- readonly name: "consent-video";
141
- readonly version: string;
142
- readonly parameters: {
143
- readonly template: {
144
- readonly type: ParameterType.STRING;
145
- readonly default: "consent-template-5";
146
- };
147
- readonly locale: {
148
- readonly type: ParameterType.STRING;
149
- readonly default: "en-us";
150
- };
151
- readonly additional_video_privacy_statement: {
152
- readonly type: ParameterType.STRING;
153
- readonly default: "";
154
- };
155
- readonly datause: {
156
- readonly type: ParameterType.STRING;
157
- readonly default: "";
158
- };
159
- readonly gdpr: {
160
- readonly type: ParameterType.BOOL;
161
- readonly default: false;
162
- };
163
- readonly gdpr_personal_data: {
164
- readonly type: ParameterType.STRING;
165
- readonly default: "";
166
- };
167
- readonly gdpr_sensitive_data: {
168
- readonly type: ParameterType.STRING;
169
- readonly default: "";
170
- };
171
- readonly PIName: {
172
- readonly type: ParameterType.STRING;
173
- readonly default: undefined;
174
- };
175
- readonly include_databrary: {
176
- readonly type: ParameterType.BOOL;
177
- readonly default: false;
178
- };
179
- readonly institution: {
180
- readonly type: ParameterType.STRING;
181
- readonly default: undefined;
182
- };
183
- readonly PIContact: {
184
- readonly type: ParameterType.STRING;
185
- readonly default: undefined;
186
- };
187
- readonly payment: {
188
- readonly type: ParameterType.STRING;
189
- readonly default: undefined;
190
- };
191
- readonly private_level_only: {
192
- readonly type: ParameterType.BOOL;
193
- readonly default: false;
194
- };
195
- readonly procedures: {
196
- readonly type: ParameterType.STRING;
197
- readonly default: undefined;
198
- };
199
- readonly purpose: {
200
- readonly type: ParameterType.STRING;
201
- readonly default: undefined;
202
- };
203
- readonly research_rights_statement: {
204
- readonly type: ParameterType.STRING;
205
- readonly default: "";
206
- };
207
- readonly risk_statement: {
208
- readonly type: ParameterType.STRING;
209
- readonly default: "";
210
- };
211
- readonly voluntary_participation: {
212
- readonly type: ParameterType.STRING;
213
- readonly default: "";
214
- };
215
- readonly purpose_header: {
216
- readonly type: ParameterType.STRING;
217
- readonly default: "";
218
- };
219
- readonly procedures_header: {
220
- readonly type: ParameterType.STRING;
221
- readonly default: "";
222
- };
223
- readonly participation_header: {
224
- readonly type: ParameterType.STRING;
225
- readonly default: "";
226
- };
227
- readonly benefits_header: {
228
- readonly type: ParameterType.STRING;
229
- readonly default: "";
230
- };
231
- readonly risk_header: {
232
- readonly type: ParameterType.STRING;
233
- readonly default: "";
234
- };
235
- readonly summary_statement: {
236
- readonly type: ParameterType.STRING;
237
- readonly default: "";
238
- };
239
- readonly additional_segments: {
240
- readonly type: ParameterType.COMPLEX;
241
- readonly array: true;
242
- readonly default: readonly [];
243
- readonly nested: {
244
- readonly title: {
245
- readonly type: ParameterType.STRING;
246
- readonly default: "";
247
- };
248
- readonly text: {
249
- readonly type: ParameterType.STRING;
250
- readonly default: "";
251
- };
252
- };
253
- };
254
- readonly prompt_all_adults: {
255
- readonly type: ParameterType.BOOL;
256
- readonly default: false;
257
- };
258
- readonly prompt_only_adults: {
259
- readonly type: ParameterType.BOOL;
260
- readonly default: false;
261
- };
262
- readonly consent_statement_text: {
263
- readonly type: ParameterType.STRING;
264
- readonly default: "";
265
- };
266
- readonly omit_injury_phrase: {
267
- readonly type: ParameterType.BOOL;
268
- readonly default: false;
269
- };
270
- };
271
- };
272
- private readonly recorder;
273
- private readonly video_container_id;
274
- /**
275
- * Instantiate video consent plugin.
276
- *
277
- * @param jsPsych - JsPsych object
278
- */
279
- constructor(jsPsych: JsPsych);
280
- /**
281
- * Create/Show trial view.
282
- *
283
- * @param display - HTML element for experiment.
284
- * @param trial - Trial data including user supplied parameters.
285
- */
286
- trial(display: HTMLElement, trial: TrialType<Info>): void;
287
- /**
288
- * Retrieve video container element.
289
- *
290
- * @param display - HTML element for experiment.
291
- * @returns Video container
292
- */
293
- private getVideoContainer;
294
- /**
295
- * Add webcam feed to HTML.
296
- *
297
- * @param display - HTML element for experiment.
298
- */
299
- private recordFeed;
300
- /**
301
- * Playback Feed
302
- *
303
- * @param display - JsPsych display HTML element.
304
- */
305
- private playbackFeed;
306
- /**
307
- * Put back the webcam feed once the video recording has ended. This is used
308
- * with the "ended" Event.
309
- *
310
- * @param display - JsPsych display HTML element.
311
- * @returns Event function
312
- */
313
- private onEnded;
314
- /**
315
- * Retrieve button element from DOM.
316
- *
317
- * @param display - HTML element for experiment.
318
- * @param id - Element id
319
- * @returns Button element
320
- */
321
- private getButton;
322
- /**
323
- * Select and return the image element.
324
- *
325
- * @param display - HTML element for experiment.
326
- * @param id - ID string of Image element
327
- * @returns Image Element
328
- */
329
- private getImg;
330
- /**
331
- * Add record button to HTML.
332
- *
333
- * @param display - HTML element for experiment.
334
- */
335
- private recordButton;
336
- /**
337
- * Set up play button to playback last recorded video.
338
- *
339
- * @param display - HTML element for experiment.
340
- */
341
- private playButton;
342
- /**
343
- * Add stop button to HTML.
344
- *
345
- * @param display - HTML element for experiment.
346
- */
347
- private stopButton;
348
- /**
349
- * Add next button to HTML.
350
- *
351
- * @param display - HTML element for experiment.
352
- */
353
- private nextButton;
354
- /**
355
- * Mark the response in the lookit-api database as having completed the
356
- * consent frame, then finish the trial.
357
- */
358
- private endTrial;
359
- /**
360
- * Add CHS type to experiment data. This will enable Lookit API to run the
361
- * "consent" Frame Action Dispatcher method after the experiment has
362
- * completed.
363
- *
364
- * @returns Object containing CHS type.
365
- */
366
- static chsData(): {
367
- chs_type: string;
368
- };
369
- }
370
- export {};