move WebAudio keyboard RT seconds-to-ms conversion from audio-keyboard-response plugin to getKeyboardResponse

This commit is contained in:
Becky Gilbert 2021-04-09 13:41:31 -07:00
parent 94a094f628
commit fb2ad41224
2 changed files with 1 additions and 4 deletions

View File

@ -2337,7 +2337,7 @@ jsPsych.pluginAPI = (function() {
} }
parameters.callback_function({ parameters.callback_function({
key: key, key: key,
rt: rt, rt: rt_ms,
}); });
if (keyboard_listeners.includes(listener_id)) { if (keyboard_listeners.includes(listener_id)) {

View File

@ -155,9 +155,6 @@ jsPsych.plugins["audio-keyboard-response"] = (function () {
jsPsych.pluginAPI.cancelAllKeyboardResponses(); jsPsych.pluginAPI.cancelAllKeyboardResponses();
// gather the data to store for the trial // gather the data to store for the trial
if (context !== null && response.rt !== null) {
response.rt = Math.round(response.rt * 1000);
}
var trial_data = { var trial_data = {
rt: response.rt, rt: response.rt,
stimulus: trial.stimulus, stimulus: trial.stimulus,