import { ParameterType } from 'jspsych'; import html from '../utils/html.js'; const info = { name: "mark-call", parameters: { }, }; class jsPsychMarkCall { constructor(jsPsych) { this.jsPsych = jsPsych; } static { this.info = info; } trial(display_element, trial) { // Get the last recording from the previous trial const lastTrialData = this.jsPsych.data.getLastTrialData(); const recordingData = lastTrialData.values()[0]; if (!recordingData || !recordingData.response) { display_element.innerHTML = `
No recording found from the previous trial.
Error loading audio data.
Listen to your recording and mark when you would lift:
You can use keyboard controls (space and arrow keys) to play and skip the recording.
Adjust playback speed for more precise control.