mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-11 16:18:11 +00:00
fixes #340
This commit is contained in:
parent
b5bdcfa345
commit
b0ecd233d9
@ -112,10 +112,13 @@ jsPsych.plugins["single-audio"] = (function() {
|
||||
jsPsych.pluginAPI.clearAllTimeouts();
|
||||
|
||||
// stop the audio file if it is playing
|
||||
// remove end event listeners if they exist
|
||||
if(context !== null){
|
||||
source.stop();
|
||||
source.onended = function() { }
|
||||
} else {
|
||||
audio.pause();
|
||||
audio.removeEventListener('end', end_trial);
|
||||
}
|
||||
|
||||
// kill keyboard listeners
|
||||
|
Loading…
Reference in New Issue
Block a user