@jspsych-contrib/plugin-audio-multi-response
v1.0.0
Published
## Overview
Downloads
1,306
Readme
audio-multi-response
Overview
This plugin plays an audio file and records responses generated by both button click and the keyboard. Allowing multiple response modalities is useful when designing assessments that will be administered on both desktop and mobile (e.g., phone or tablet) devices. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time.
If the browser supports it, audio files are played using the WebAudio API. This allows for reasonably precise timing of the playback. The timing of responses generated is measured against the WebAudio specific clock, improving the measurement of response times. If the browser does not support the WebAudio API, then the audio file is played with HTML5 audio.
Audio files can be automatically preloaded by jsPsych using the preload plugin. However, if you are using timeline variables or another dynamic method to specify the audio stimulus, then you will need to manually preload the audio.
The trial can end when the subject responds, when the audio file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent a response from being recorded before the audio has finished playing.
Loading
<script src="https://unpkg.com/@jspsych-contrib/[email protected]">
Compatibility
jsPsych v7.0
Documentation
See documentation
Author / Citation
Created by Adam Richie-Halford
Citation:
Pending