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 where you would lift:
🔊 Playing back from marked point...
If this sounds right, press Submit. Otherwise, choose a new mark point.
✓ Lifting point confirmed at: ${formatPreciseTime(liftPointTime)}
Preview completed. Press Submit to continue, to play again, or mark a new point.