-
How can create a playback button for audio stimuli, there does not seem to be an option in the audio plug-ins ? Use case: I want the subject to be able to replay the stimuli (an audio) as many times as they want. Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
jodeleeuw
Feb 25, 2019
Replies: 1 comment 4 replies
-
You could set up a looping timeline with the This code is edited to reflect the bug that @Marita-K-Everhardt caught below! var repeat = {
timeline: [{
type: 'audio-button-response',
stimulus: 'sound.mp3',
choices: ['Play Again', 'Continue'],
}],
loop_function: function(data){
if(data.values[0].button_pressed == 0){
return true; // loop again!
} else {
return false; // continue
}
}
} |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
jodeleeuw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could set up a looping timeline with the
audio-button-response
plugin so that whenever a repeat button is clicked the trial loops and the audio plays again.This code is edited to reflect the bug that @Marita-K-Everhardt caught below!